Rishabh Ohri
Rishabh Ohri

Reputation: 1310

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 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

Upvotes: 1

Views: 226

Answers (1)

KristoferA
KristoferA

Reputation: 12397

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

Upvotes: 1

Related Questions