开发者

EF4 Model-First entities "non-partialable" when used in separate project

I cracked open the tekpub EF4 series last weekend and replaced my subsonic stuff that I started with on a new site. I was a little miffed to find however, that with my entities in a separate domain project, I could not "partial" the entities on my MVC2 app. I did the awful thing of putting my EF4 model right in my app and then it worked fine (the TekPub vid dealing with MVC2 had this setup as well which may 开发者_如何学Chave been for the same reason?). There was no explicit reason given for why I couldn't do this. Did I miss something?


You can certainly use partial classes with the EF model in a separate assembly. However, with any partial class (not just EF), all partial definitions must be in the same assembly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜