smartcaveman
smartcaveman

Reputation: 42246

Programmatic API for the Code Generators of LINQ-to-SQL and Entity Framework

What options do I have for generating class definitions for LINQ-to-SQL and Entity Framework context and data entity objects? I understand how to use the Visual Studio tools, but is there a programmatic API I can use to define the model and generate the corresponding code from another application?

Upvotes: 1

Views: 131

Answers (1)

Wyatt Barnett
Wyatt Barnett

Reputation: 15673

Linq to SQL options aren't great -- best thing I know of is L2ST4 which at least gives one much more control over the generated classes. The designer document is a big, fancy XML file so I guess you could make something that generates it externally if you were so motivated.

Entity Framework has much better options -- especially since v 4.1 gives you code-first. So that means all you need to do is generate a C# class and then EF handles the rest.

Upvotes: 1

Related Questions