Jul 04, 2020 11:10 AM|JamieP1|LINK
Im using EF6 and Repository Pattern. I would like to involve Unit Testing (NUnit) so have read and gone through some tutorials.
My aim to to have separate projects but not sure at which stage i should add separation into different classes.
I add an .EDMX file, add connection to my database. Add 2 tables (Customer and Orders)
Add a folder for partial classes (overriding Customers and Orders and adding additional methods)
public interface IRepository<TEntity> where TEntity : class
This is used to create other repositories e.g.
ICustomer (public interface ICustomer : IRepository<Customer>
I create a UoW Interface (inherits IDisposable) which has code to the Repositories (ICustomer and IOrders) and then add a class to inherit from it.
Finally a web application (webforms).
Could someone explain how i could break these steps into separate classes so when i implement NUnit i have clean separate layers (I would have a separate project for Unit Testing)? I know step 4 can be any application but would love an example of where i
would put those interfaces and classes to separate my solution.