Home Dashboard Directory Help
Search

Visual Studio 2012 - Data Sources window remains empty when selecting Add New Datasource->Database->Entity Data Model->Generate from Database by Robert Breitenhofer


Status: 

Active


10
0
Sign in
to vote
Type: Bug
ID: 767925
Opened: 10/18/2012 5:28:42 AM
Access Restriction: Public
1
Workaround(s)
view
4
User(s) can reproduce this bug

Description

When you want to add a New Data Source to your project (and you want to see this data source in the Data Sources window = Shift+Alt+D) and you select Add New Datasource->Database->Entity Data Model->Generate from Database after the wizard is completed the Data Sources window remains empty in Visual Studio 2012. In Visual Studio 2010 the same steps worked ok and you can see the Entity Data Model data source in the Data Sources Window. Reported on the MSDN DE-DE Forums by user André Steden: http://social.msdn.microsoft.com/Forums/de-DE/visual_studiode/thread/1241ee59-0936-4290-a1bf-46b9935b1089
Details
Sign in to post a comment.
Posted by Microsoft on 2/8/2013 at 10:23 AM
Hi,
The walkthrough does use Code First but you can also use Model First, we just had to pick one for the step-by-step walkthrough.
From the walkthrough...
"We're going to use Code First for our model, so we'll hand write a set of classes and a derived context. If you are using the EF Designer then these classes will be generated for you."
We realize this is a change from VS2010, but we decided that using the standard object databinding was a better option moving forwards. We totally understand that not everyone likes this change. If you want to continue to use the Database option you do need to perform some extra steps but it is still possible.
~EF Team
Posted by Brian Dahl on 1/18/2013 at 1:55 PM
It is horrible that you have to use this workaround....
Posted by BillB1234 on 12/27/2012 at 7:50 AM
Microsoft, I think you are missing the point. The link http://msdn.microsoft.com/en-us/data/jj574514 shows a "Code First" approach.

The original bug is with the "Model First" approach. The behaviour has changed from VS 2010; VS 2012 no longer adds the EF data sources automagically. The EF classes now need to be added manually.

The workaround is to generate the EF model as outlined in the original post (a.k.a. VS 2010 style) AND THEN repeat adding the Data Source but this time using "Object" instead of "Database". The EF classes will appear and can be ticked to include in the Data Sources window. Be sure to compile before adding the objects.
Posted by Microsoft on 12/3/2012 at 4:28 PM
Hello,
Thank you for contacting us, using Object Data Source is now the recommended approach for using EF in databinding scenarios. See this article for more details - http://msdn.microsoft.com/en-us/data/jj574514. The article also includes a link to revert to the old code generation if that is what you desire.
~EF Team
Posted by Microsoft on 12/3/2012 at 4:28 PM
Hello,
Thank you for contacting us, using Object Data Source is now the recommended approach for using EF in databinding scenarios. See this article for more details - http://msdn.microsoft.com/en-us/data/jj574514. The article also includes a link to revert to the old code generation if that is what you desire. If you encounter any further issues please report them via the Entity Framework CodePlex site - http://entityframework.codeplex.com/WorkItem/Create. ~EF Team
Posted by samDevMan on 11/7/2012 at 12:28 PM
I am also seeing this behavior; what happens is when the tables desired in the model are selected, they do not seem to be captured in the model entity, which only shows "settings" no table names. And as reported the DataSources window remains empty.
Posted by Microsoft on 10/18/2012 at 11:33 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 10/18/2012 at 5:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by BillB1234 on 12/27/2012 at 7:50 AM
The workaround is to generate the EF model as outlined in the original post (a.k.a. VS 2010 style) AND THEN repeat adding the Data Source but this time using "Object" instead of "Database". The EF classes will appear and can be ticked to include in the Data Sources window. Be sure to compile before adding the objects.