i have used the repo pattern in my web forms application in the following way
UI Layer:
it contains the code behind files in which the controls are being binded and user actions like insert update etc are catered for
the UI Layer calls the
Repository Layer:
it contains the repository classes inheriting the GenericRepo:IGeneric
and the
Data Layer:
it contains the EF generated domain classes
the layers are strict for the time being that is the UI layer calls the Repo layer and it in turns call the data layer to fetch the data.
Problem:
now the problem im facing is that if for example i need a list of products on the Products.aspx
page i need to do some thing like
IProductRepo pr = new ProductRepo();
IList<Products> lstProducts = pr.GetAll();
i dont want to add the reference of Data Layer to the UI layer in order to access the domain entities i.e generated by the EF
what are my options? please guide me to the right path
regards.