Programming to interfaces while mapping with Fluent NHibernate

后端 未结 5 1150
闹比i
闹比i 2020-12-01 01:22

I have been whipped into submission and have started learning Fluent NHibernate (no previous NHibernate experience). In my project, I am programming to interfaces to reduce

5条回答
  •  有刺的猬
    2020-12-01 02:05

    I realise this is a diversion, and not an answer to your question (although I think mookid has got that covered).

    You should really evaluate whether interfaces on your domain entities are actually providing anything of worth; it's rare to find a situation where you actually need to do this.

    For example: How is relying on IMessage any less coupled than relying on Message, when they both (almost) undoubtedly share identical signatures? You shouldn't need to mock an entity, because it's rare that it has enough behavior to require being mocked.

提交回复
热议问题