views:

44

answers:

1

HI ,

The designer creates Entity classes as partial when using LINQ to SQL and the Entity Framework. Is there some way we can create the Entity classes as .cs physical files while using LINQ to SQL or the Entity Framework

A: 

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

KristoferA - Huagati.com
Devart Entity Developer has the same option. http://www.devart.com/entityDeveloper/
Devart