Info
Version: | 1.0.1 |
Author(s): | Ajay Sharma(AJ) |
Last Update: | Friday, July 17, 2020 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/ajays1991/GenericController |
NuGet Url: | https://www.nuget.org/packages/GenericRestController |
Install
Install-Package GenericRestController
dotnet add package GenericRestController
paket add GenericRestController
GenericRestController Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.AspNetCore.Mvc.Core(>= 2.2.5)
Tags
In most of the scenarios the code for implementing Create, Get, Index, Delete, Update for each model is same and writing the same code again in all the controllers can be avoided by implementing generics for the controllers. In this article i have also implemented generic implementation for the repository pattern for entity framework.
It reduces the amount of code we need to implement REST service.