Repository Pattern Web API C# ASP.NET | Free 20 Min Tutorial + GitHub

preview_player
Показать описание
Step by step guide to building a generic repository in an ASP.NET Web API application. Learn about the specification pattern to keep our repository flexible and able to accommodate any type of query. We'll use Ardalis Specification package from NuGet to make our life easy. Later we'll make the repository ever more robust by taking care of pagination and DTO mapping using AutoMapper.

You can follow along with the video and get the finished code from our GitHub page. Also, check out the Nano ASP.NET Boilerplate to build SaaS and MVP projects faster and easier and ever before.

Blog tutorial:

GitHub Sample Code

Nano ASP.NET Boilerplate

0:00 - Intro
1:00 - Basic ASP.NET Web API
2:18 - Generic Repository
4:30 - Specification Pattern
6:40 - Ardalis Specification
11:20 - Create a Specification
14:00 - Benefits of Specification
15:40 - Pagination
18:58 - DTO Mapping
21:10 - Add Services Registrations
21:44 - Add a Controller and Test Application
22:40 - Conclusion
Рекомендации по теме