As far as I've learned, the
IRepository should contain
CRUD. Then we inherit this
IRepository in our other Interfaces like
ProductRepository, with methods like
We could also do the same with n-tier architecture. like,
DAL Class Library and in it define a class
Product with methods like
Repo.ProductRepository classes we initialize
DB Context of
Entity Framework and query our relevant data.
The calling is similar in both
DAL.Product methods from
In view of these similarities, my question what is the benefit of Repos?
I can do the same with much ease using n-tier architectures with (
BLL Class Library,
DAL Class Library).