dependency injection

Dependency Injection to The Core (Part - III)

We came to know about the term IoC container. There are many IoC containers available and most of them do the same things somewhat differently. Let’s use one of them in our current project. Let’s pick Autofac which has a great documentation online. Here is the link where you can know all about the Autofac integration related stuff with Web API projects, http://autofac.readthedocs.io/en/latest/integration/webapi.html Since we are just beginners wondering around the world of dependency injection. We will go slow and…

Keep reading

Dependency Injection to The Core (Part - II)

Say for example, our client changed their requirements and now wants us to read and write comma separated data (CSV) from a filesystem instead of a database. Suppose I’ve searched and downloaded a cool library that can work with CSV files. So, we have a CSV library configured and ready to talk with our CSV files in the data access layer. If you are following me then you would say, now that we have a new data access layer, we also need a new repository. Right? Exactly! Since we…

Keep reading

Dependency Injection to The Core (Part - I)

Okay since I’m writing blogs mostly on asp.net core lately, you might be wondering that why am I writing a blog on a topic which is already available in asp.net core official documentation. Well, in this post I’m not only going to talk about how you can achieve DI (Dependency Injection) in .net core but will also discuss about DI itself (what, why and how). This article reflects how I actually learned (still learning) DI. So, if you don’t want to follow my approach or…

Keep reading