开发者

Entity classes created by Entity Framework and LINQ to SQL

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜