开发者

EF + POCO Template

开发者 https://www.devze.com 2023-01-30 22:30 出处:网络
I\'ve started using poco templates so that I can generate the pocos for my EF model and copy them to another library.. all this works great however when I need to generate the poco template it needs t

I've started using poco templates so that I can generate the pocos for my EF model and copy them to another library.. all this works great however when I need to generate the poco template it needs to be in the 开发者_如何转开发same library as my EF model before I can move it to another - this leads to that the generated pocos have the namespace from the library where my EF model is, and when I move the pocos to another library I need to edit each of the pocos' namespace because they are the same as the library with my EF model.

I've used (http://blogs.msdn.com/b/efdesign/archive/2010/03/10/poco-template-code-generation-options.aspx)

Thanks in advance.


In the generated .tt file I edited the line "string namespaceName = code.VsNamespaceSuggestion();" to match the namespace I wanted.

0

精彩评论

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

关注公众号