Yeoman generator for an ASP.NET Core 1.0 API project.
Make sure you have installed a recent version of node.js. You can download it here : https://nodejs.org/en/.
Install Yeoman :
npm install yo -gThe -g flags install it globally so you can run yeoman from anywhere.
Install the generator :
npm install generator-dgp-api-aspnetcore -gIn a command prompt, navigate to the directory where you want to create the new project and type :
yo dgp-api-aspnetcoreAnswer the questions :-)
...to do...
The DependencyRegistration class is used to register the dependencies of the application, so that is uses the built-in dependency injection framework.
services.AddTransient<IMyBusinessClass, MyBusinessClass>();
services.AddScoped<IMyBusinessClass, MyBusinessClass>();
services.AddSingleton<IMyBusinessClass, MyBusinessClass>();Transient Every time the service is injected, a new one is instantiated.
Scoped The lifetime of the service is tied to the request scope. Only 1 instance is instantiated per request.
Singleton Only one instance is instantiated for the whole application.
More info about the dependency injection in ASP.NET Core can be found at : https://docs.asp.net/en/latest/fundamentals/dependency-injection.html.
Use this class to register your AutoMapper mappings.
More info can be found at : http://automapper.org/.
...to do...
...to do...