ASP.Net Core 1.0

Hi there,

Yesterday I started to build a simple website with registration and email confirmation with the ASP.Net Core 1.0 framework on a windows machine.

At first glance, ASP.Net Core looks like MVC 5 with little differences, for instance the package.config is now a json file such as the appsettings file. The way of using them has changed too.

If you wanna use appsettings variables, you have to retrieve them in the Startup.cs class and define which classes matches the settings like following :
services.Configure<MyAppSettings>(Configuration.GetSection("MyAppSettings"));

Then simply add IOptions<MyAppSettings> myAppSettings in a constructor to retrieve the data thanks to the dependency injection.

In order to set up the email confirmation, I discovered that the SmtpClient is not part of the framework. Later, I wanna set up a simple transaction scope to surround the database calls and discovered that ASP.Net Core 1.0 doesn’t have implemented transactions yet.
The only way to have transactions is to reimplement the System.Transactions of the .Net Framework 4.6.

Regards,

Pierre-Luc

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *