Autofac (dependency injection container) in. NET

Autofac concept Autofac is an IOC container. Many beginners don't understand IOC and DI. Brief summary: IOC: instead of creating / new the instance, the user gives it to the container to create (AutoFac acts as the container here). This is the process of controlling inversion to obtain dependent objects is reversed. Originally, you took the i ...

Posted on Thu, 14 Oct 2021 02:34:32 -0400 by pjoshi

Simple learning. NET CORE MVC Dependency Injection

1, Concept It is dependency injection that is new to. NET CORE MVC and not used to but very important. Compared with. Net MVC,. NET CORE MVC tends to rely on dependency injection to handle the transfer (Reference) of objects. In the past, it was used to using static objects or instantiated classes. In. NET CORE MVC, it is generally changed to e ...

Posted on Sat, 02 Oct 2021 16:40:32 -0400 by vmarellano

[. Net Core] [4] shallow copy and deep copy

1, Foreword During the development process, we often encounter the copy of an object class of a reference type. We can get a new backup real column and modify it without affecting the original object instance. There are usually two kinds: shallow copy and deep copy. 2, Serialization tag Mark the object class to be copied as Serializabl ...

Posted on Mon, 20 Sep 2021 21:03:47 -0400 by madchops