Replies: 2 comments 1 reply
-
Can you please explain what do you mean by |
Beta Was this translation helpful? Give feedback.
-
@neman Sure I can explain with a simple example. I have a domain Student with different logics in it as to which type of student can enroll.
However my domain model consists of three classes (note the first one is an abstract class)
Here as you can see I want my domain model to perform its operations the way I outlined above. However my persistence is just a simple class with three fields. Let me know if you need more information. Thanks for your time. |
Beta Was this translation helpful? Give feedback.
-
It's just a question. I used this template for two projects so far and they were all fine. However on an another project that includes a lot of domain logics I would want to separate ef persistence data models from business models. This would give me the complete flexibility to bend my domain models however I want without leaving any trace of persistence knowledge in the domain objects.
Is this possible without introducing a new repository** layer && using this template?
If it is doable, any direction as to how to do it cleanly will be very much appreciated. Thanks a lot.
**I understand I can do this using separate repos such as IReadRepo & IWriteRepo then converting the domain models to persisted models & vice-versa. However, I'd like to stick with DbSet & EF provided repos. I'll be using EF for the lifetime of this project.
Beta Was this translation helpful? Give feedback.
All reactions