简体   繁体   中英

How to add an existing data model as a Data Source in Visual Studio 2010?

I'm experimenting with a simple WPF application with a .edmx file as the Data source in Visual Studio 2010.

I don't know what I did, but suddenly the data source pane/window is now empty, but the .edmx file is still part of my project.

The data source window only has the option to "Add New Data Source"; how do I make make it use the existing entity model as the data source?

You should look in your app config and see if you can find the connection string for your edmx file. Depending on what type it is SqlCE or SqlServer you should have the connection info there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM