阅读背景:

我应该如何将行为注入实体

来源:互联网 

I am exploring the use of Entity Framework Database First and I am trying to understand if I should inject behavior into an entity, and if so, what is the best technique for doing this. I typically have done this in the past to avoid anemic domain objects. A couple use cases are where I inject a specification into an entity (specification pattern/define composable business rules) or where I perhaps inject a ninject implemented factory into a root entity where the binding of the implementation is determined by a strategy/factory method at point of use) So for example below, I would use an IOC to inject in ISomethingSpec implementation.I am exploring the use of Entity Framework Data




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: