views:

96

answers:

2

I create a linq to sql class
Create all entities that i need for my app

Now i need to create this entities in the database
is there a way to generate all of my entities?

yes i want to generate tables for the entities

A: 

Depending on if you have it installed (and what version) Visio can do this for you (you must have the Entrprise Architect version from 2003+).

If you are trying to do it automatically from code I am not aware of a way to do this (at least not just with .NET). Some OR/M frameworks provide this functionality but the do it by building static scripts at compile time.

GrayWizardx
+1  A: 

I found a way out of these problem. after the diagram is created in the linq2sql file, you just have to invoke the CreateDatabase method of your datacontext.
Here is the link

CoffeeCode