Using repositories in a setup with Entity Framework Core is a no-go from my point of view. The main reason I think this is because the DbContext class already encapsulates repositories (the DbSets) and a unit of work (SaveChanges). On the other hand, if not using repositories, service methods or handlers (if you are using MediatR) tend to then get cluttered with data retrieval logic. So, how to solve that? Well in this video I will show you a technique that keeps your classes free from data retrieval logic and renders the use of repositories obsolete.
#dotnet #efcore #csharp #aspnetcore #repository
Join this channel to get source code access and other perks:
/ @codewrinkles
Content
1. Intro: 00:00
2. Overview with repositories: 00:42
3. Setup without repositories: 02:02
4. A Common objection: 03:06
5. New technique to solve the objection: 03:44
Also follow me here (especially if you are a self taught developer):
✅My other channel: / @danpatrascutech
✅Facebook: / danpatrascutech
✅Instagram: / danpatrascutech
✅TikTok: / danpatrascutech
Негізгі бет Ғылым және технология This Will Make Your Repositories Obsolete
Пікірлер: 87