Unity container is a lightweight dependency injection container. It manages creation and resolution of objects that we registered based on life time that we specified. Here is a list of lifetime managers that exist in Unity.
Let’s say you have a Web API controller and you want to validate Create(POST)and Update(PUT) operations. You also don’t want to pollute your action methods with validation logic and encapsulate validation mechanism.
Check out the descent Generic Unit Of Work and Repositories framework. It allows quickly bootstrap your application with Entity Framework. This lightweight framework will also allow you to elegantly, unobtrusively, and easily patternize your applications and systems with Repository, Unit of Work, and Domain Driven Design. To use Generic Repositories or not? The framework allows […]
We will implement logging of actions in controllers and catch all exceptions in application and log them. First, go to the visual studio and create ASP.NET Web API project. Then, using Nuget Package Manager add log4net to this project.