views:

66

answers:

1

Hi,

I've created my first ADO.net entity data model. In it there are 2 tables (with no relations, just simple tables).

In my Project's App_Data directory there is an (empty) mdf file called "trans.mdf".

When I select "generate database from model" in the ADO.NET model, I can select my "trans.mdf" in the dialog.

It then builds the ddl and sql file.

The next step then is to execute the generated .sql file. And here I'm totally lost. When I select upload, there comes an authentication box from sql server 2008. And finally it tells me, that the connection failed.

How can I execute the .sql in the trans.mdf?

Thanks a lot for any help :)

+1  A: 

Hi,

this video shows how to generate the needed sql statements and then connect to a SQL 2008 to get things going. Creating an Entity Data Model the Model-First Way.

XIII
Hi,the problem is, that i know how to publish to a .dbo file in VS, but not how to publish to a .mdf file in VS.
mweber
this is the same question:http://stackoverflow.com/questions/3402260/edmx-populating-mdf
mweber