views:

68

answers:

1

I've created an ADO.NET entity data model with Visual Studio and have to assign the properties to a matching table now. If I create the data model with an existing database, Visual Studio uses this database automatically to assign the properties. I have to start with a clear model because I don't have access to the database, the only thing I know is the structure of it. Is there a way to do this without access to a existing database? Some kind of [Column(Name="A_Name")] as in LINQ to SQL...

A: 

I don't believe there's an option in VS 2008. However, I would recommend downloading the Visual Studio 2010 Beta. The Entity Designer in VS 2010 has a new feature known as 'Generate Database from Script' which will allow you to not only generate a DDL script, but will also generate SSDL using a Table-per-type strategy and the appropriate mappings.

This will allow you to work in a disconnected environment where you can't access your database. When you are online again and have access to your database, you can either 'Update Model' using the database or overwrite your database schema with the one described in the DDL script.

Adi Unnithan