I am using DDD approach with c# and for data storage I am using SQL server. Also I am using code first approach with fluent api in order to build database objects from domain.

Since I am using domain to write data and finders to read data from SQL, I was thinking about an approach where fluent api in write mode would be substituted with DB first approach (EF to objects) in order to benefit from EF navigational properties when creating read only finders logic.

Would this be a logical think to do here, or this would represent an anti-pattern that would do more damage?

  • Are you using Anemic Domain Model or Rich Domain Model ? Because if you're using Rich Domain Model, persistence is an implementation detail that is not bound to the model per-se, and can be substituted at will by the developer. I'm getting mixed signals from the question, specially because the concept of Entity on EF and on DDD are different from each other. Also, related question.
    – Machado
    Jun 9, 2017 at 16:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.