I am using ADO.NET directly with MVC 5 and not Entity Framework.
I am referring to this example to implement Repository Pattern.
For a simple implementation of Repository Pattern:
- I will create a Model
- I will create an interface with CRUD method declarations
- I will create a class in Data Access Layer which will implement the above interface and will have CRUD method implementations
I want to know why Interface is used? Can I not directly use a class, as per point (3) above.
What is the role of interface?
As per the above three points mentioned, is it the correct implementation of Repository Pattern?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire