Tag Archives: c#

Installing and using Secret Manager on ASP.NET Core

In your ASP.NET Core application you can load settings from a file named secrets.json that can store API ids and secrets. The default generated template includes:

if (env.IsDevelopment())

That is going to add that file only on a development environment. So the whole point of using this secret storage is to avoid having your ClientId and ClientSecret exposed on source control. In production you can have it stored on environment settings, the generated template includes:


Which is going to add the environment variables on your application configuration.
Continue reading

The new ASP.NET Core 1.0

ASP.NET 5 is dead, now it is called ASP.NET Core 1.0.

  • ASP.NET 5 is now ASP.NET Core 1.0
  • .NET Core 5 is now .NET Core 1.0
  • Entity Framework 7 is now Entity Framework Core 1.0

It is not yet officially released, they don’t have a date yet but they said they won’t take just a month but they won’t take years. You can use it today in production if you want to, but as it is not done yet some things could break, be renamed…
Continue reading

Design Patterns: Template Method

This method consist in having a Template for your classes. It solves the problem of having multiple classes with duplicated code. Instead we can just create an abstract class and make our classes inherit from it. This way we can implement the common functionality in the parent class and have other classes inherit the unique behavior from a unique place.
Continue reading

Design Patterns: Adapter

2015-43-09 10-43-09-063 The adapter is used when you want to integrate a class from another source into your code.

It could also be used to enable the use of legacy classes into your new architecture. It can also be used with classes that needs very specific methods to complete some work, like database access classes, and then they could be adapted to use a common interface.
Continue reading