开发者

Why doesn't Entity Framework easily allow a custom base class?

Is this a design choice by Microsoft, or is there a way to do it, tha开发者_如何学Pythont I'm not aware of?


If you want to use EF Entity Objects as of your entity types then you should have them implement a custom interface in a separate partial class since they are already inheriting from EntityObject.
However, if you use the new EF 4.0 POCO Entities, then you can freely have them inherit from ant custom base class that you want.
BTW, this has nothing to do with EF "design", it's just because you cannot have Multiple Inheritance in C#.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜