开发者

Entity classes created by Entity Framework and LINQ to SQL

开发者 https://www.devze.com 2022-12-19 23:15 出处:网络
HI , The designer creates Entity classes as partial when using LINQ to SQL and the E开发者_如何学Gontity Framework. Is there some way we can create the Entity classes as .cs physical files while usin

HI ,

The designer creates Entity classes as partial when using LINQ to SQL and the E开发者_如何学Gontity Framework. Is there some way we can create the Entity classes as .cs physical files while using LINQ to SQL or the Entity Framework


Are you asking for file-per-class? If so, I think Damien Guard's L2S T4 templates has an option to generate one .cs file per entity class. Check out these two blog posts:

http://damieng.com/blog/2009/01/19/linq-to-sql-templates-updated-now-on-codeplex
http://damieng.com/blog/2009/11/06/multiple-outputs-from-t4-made-easy-revisited

0

精彩评论

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

关注公众号