@manhnguyenv

Welcome to my blog!

ASP.NET Core and Dependencies Injection

July 29, 2018 00:34

ASP.NET Core and Dependencies Injection (edit)

https://joonasw.net/view/aspnet-core-di-deep-dive

Dependency Inject (DI)

December 19, 2017 17:07

Video training

https://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Dependency-Injection

Using Autofac

https://github.com/miguelcastro67/DI-Webcast

MVC: Global.asax.cs: Application_Start

ContainerBuilder builder = new ContainerBuilder();
builder.RegisterType<CustomerRepository>().As<ICustomerRepository>();
builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly())
.Where(t => t.Name.EndsWith("Controller"));
IContainer container = builder.Build();
DependencyResolver.SetResolver(new AutofacDependencyResolver(container));

 

.Net Core Console App

https://dzone.com/articles/using-dependency-injection-in-net-core-console-app

http://asp.net-hacker.rocks/2017/02/08/using-dependency-injection-in-dotnet-core-console-apps.html

http://derpturkey.com/net-core-dependency-injection-in-console-applications/

https://andrewlock.net/using-dependency-injection-in-a-net-core-console-application/

https://pioneercode.com/post/dependency-injection-logging-and-configuration-in-a-dot-net-core-console-app

 

.NET Console App

http://www.c-sharpcorner.com/uploadfile/4d9083/dependency-injection-using-simple-injector/

https://social.technet.microsoft.com/wiki/contents/articles/35761.c-dependency-injection-in-console-application.aspx

Categories

Recent posts