Implementing DDD Entity class in C#

前端 未结 3 1095
广开言路
广开言路 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:39

    For implementation of correct equality operations I recommend to have a look on a base class of domain entities in Sharparchitecture - https://github.com/sharparchitecture/Sharp-Architecture/blob/master/Solutions/SharpArch.Domain/DomainModel/EntityWithTypedId.cs . It has implementation of all required functionality. And have a look on some other code there, IMO, it will be very useful for you and your case.

提交回复
热议问题