This article will demonstrate about how to get data using Dapper and Repository Pattern in Web API and how to use Dependency Injection using Unit of Work in Web API. I will show you how to implement Generic Repository with Custom Repository for CRUD operations.
Asp.Net Web API is a powerful platform for building HTTP enabled service APIs that expose service and data. It can be consumed by a broad range of clients including browsers, mobiles, desktop and tablets. As it is HTTP service, so it can reach a broad range of client.
Asp.Net Web API is very much similar to Asp.Net MVC because of it contain the Asp.Net MVC feature like routing, controllers, action results, filter, model etc. Note Asp.Net Web API is not a part of MVC framework. It is a part of the core Asp.Net. You can use Web API with Asp.Net MVC or any other types of web application. You can also create a stand-alone service using the Web API.
Pages : 1