The application must have 3 levels

I am writing a small application in WPF. This allows me to save and read data from db. It has 3 levels (business logic, presentation level and data access). I use a basic approach, and the Entity Framework created a model for me.

My question is, where should I store my .edmx generated model?

If I put it in Data Access, I will need to write some duplicate code in my business logic, and if I put this model in Business Logic, then what should I store in the data access level?

+4
source share
1 answer

I believe that the Entity Framework model most logically relates to the level of data access. I usually used a Data Service wrapper on top of EF, then you can initiate transactions, do business logic validation, etc. At a level above or above. Some additional information about this is here .

There is an interesting slide on EF and the level of data access here .

+2
source

Source: https://habr.com/ru/post/1388831/


All Articles