Repository Pattern In ASP.NET Core Web API
Code Maze
►► Master Web API development Best Practices: https://bit.ly/3TnqoFQ
►► Build great web apps in Blazor WebAssembly: https://bit.ly/437g87T
►► Support us on Patreon and get the source code: https://www.patreon.com/CodeMaze
In this video, we are going to learn how to create the Repository Pattern in an ASP.NET Core application.
The code for .NET 5 is almost the same as the one in the video. There is one small difference related to the Pomelo library. Please read the first article linked below to learn more about it. Basically, you have to modify the library version (prerelease) and slightly modify the usage of the UseMySql method.
LINKS MENTIONED IN THE VIDEO:
To visit the whole article and download the source code visit:
►► https://code-maze.com/net-core-web-development-part4/
To read the EntityFramework Core series visit:
►► https://code-maze.com/entity-framework-core-series/
To read more about the ASP.NET Core Web API series, visit:
►► https://code-maze.com/net-core-series/
FOLLOW US ON SOCIAL MEDIA!
►► https://www.linkedin.com/in/marinko-spasojevic/
►► https://twitter.com/CodeMazeBlog
►► https://www.facebook.com/CodeMazeBlog
VIDEO SUMMARY:
With the Repository pattern, we create an abstraction layer between the data access and the business logic layer of an application. By using it, we are promoting a more loosely coupled approach to accessing our data from the database. Also, the code is cleaner and easier to maintain and reuse. Data access logic is in a separate class, or set of classes called a repository, with the responsibility of persisting the application’s business model.