Implementing DDD Entity class in C#

前端 未结 3 1053
广开言路
广开言路 2021-02-03 12:48

I\'m now starting out on DDD, I\'ve already found a nice implementation for ValueObject but I cant seem to find any good implementation for Entities, i want a generic base entit

3条回答
  •  余生分开走
    2021-02-03 13:34

    I am not sure if you are after a specific library/sample code or guidelines. A good DDD solution will use factory for instantiation, persistency separated from the domain model (most ORM tends to bundle the two together), clearly define domain boundary, enforcing fields and operations through interface.

    I would strongly recommend the book Applying DDD and Patterns book by Jimmy Nilson. It discusses in depth about DDD and best practices. The examples are in C# as well which will suit your project.

提交回复
热议问题