Model first in entity framework vs2010, create new database - visual-studio-2010

I am very new to entity framework just started learning. I have been following a MCTS book to learn entity framework.
I have VS2010, sql server 2008 both of them are express editions. I have created a .edmx file in my project. Described two entities. Now I click generate database from model option, from the context menu by right clicking in the diagram. A generate database wizrd opens, now I choose new.
I don't see any option here to connect to my sql server instance?
However, I see only:
Microsoft sql server database file.
microsoft sql server compact 3.5.
My objective is to create a new database and create those two entities as tables, in my local sql server instance.
Any help shall be appreciated
Thanks

After some hit and trials I finally come to conclusion that this feature is not available in VS2010 express edition, since I was easily able to do this in vs2010 professional edition.

Related

VS 2013 Query Designer greyed out

I believe I am following the instructions at http://msdn.microsoft.com/en-us/library/vstudio/ms171960.aspx but whatever I try, the Query Designer toolbar remains greyed out and 'Query Designer' does not appear in the main menu. Am I missing something?
(VS2013 version 12.0.21005.1 REL connecting to a SQL 2008 R2 Express db)
Have posted similar problem here - Solved on this thread.
Create two connections in VS Server Explorer.
1) Microsoft SQL Server Database File (SqlClient):
Use this for editing tables, and for the connection string in the software.
2) Microsoft SQL Server + .NET Framework Data Provider for OLE DB:
Use this for visual queries.
Everything is VS, Publish options don't give 'file in use'.
On a completely unrelated Twilight Zone moment - you posted the same question, on the same day, on the same forum, and both our names are Peter G!

There is a IBM DB2 provider that works with Entity Framework 4.0 in Visual Studio 2010?

There is already a DB2 provider to Entity Framework 4.0? I'm looking for one that shows up in the "Change Data Source" dialog window this way (in VS2010):
Steps:
Right-click on the edmx design surface.
Select "Update Model from Database"
On the Update Wizard, click "New Connection"
Next to the "Data source" textbox, click "Change..."
In the Change Data Source window, I am only seeing the following data sources in the list:
Microsoft SQL Server
Microsoft SQL Server Compact 3.5 Microsoft SQL
Server Database File
<'other'>
When I select "other", I only see two entries in the Data Provider dropdown:
.Net Framework Data Provider for Microsoft SQL Server Compact 3.5
.Net Framework Data Provider for SQL Server
How do I get the DB2 provider(s) to show up here so that I can use them to model my DB2 tables?
This is a duplicate of question How to get the IBM DB2 provider to work with Entity Framework 4.0 but 2 years have passed.
You need the DB2 Plug-In for Visual Studio 2010. This is the only information I've found describing the plug-in: http://www.db2teamblog.com/2010/09/open-beta-for-visual-studio-2010.html

Is it possible to use Windows Authentication to connect to a SQL Express db?

I've been looking around to find an answer to this question, and seeing lots of different answers, some of which don't look right to me. Here's my problem.
I've created a SQL Server 2008 Express database, and populated it with tables from 2 regular SQL Server databases (it's to receive data from the 2 databases). I've done this using Windows Authentication.
Now I want to test deploying an app, as a ClickOnce application, so I've written a bare-bones console app in VS 2010. Next I tried to add a new data source to the SQL Express 2008 database. But when I try to do that I get a message saying, "This file is in use. Enter a new name of close the file that's open in another program." (I'm running VS 2010 as an administrator on my Windows 7 Ultimate box, which was one of the answers someone gave to fix this problem, but isn't working for me.) I don't have the SQL Express db open in SSMS or anything else. One solution I've read is to get into SSMS and detach the .mdf, but then how would I do maintenance, like create new SP's, views, etc? Is it a maintenance nightmare of attaching in SSMS while not in VS 2010, do DBA work, then detach the DB, get into VS 2010 do work, etc?
The database is meant to run on the user's machine; not a network share.

Database Diagramming Tools for SQL Server CE 4

Although there are GUI tools in VS2010 for entering data, writing queries etc against a SQL CE4 db, there doesn't appear to be a way to visualise the database in a digram.
So my Questions are
A) Have i missed something in VS2010 tools for sql Server CE4
b) Can i use SMSS to Diagram SQL CE4 databases. I've tried it but it wouldn't allow open the db. Is there a plugin available?
Thank you.
Microsoft does not supply a diagramming tool for SQL Server Compact 4, you could try my VS 2010 add-in http://sqlcetoolbox.codeplex.com (Create Database Graph) or the Data Port Console from http://www.primeworks-mobile.com
Actually, there IS a diagramming tool for SQL CE right into VS, but it's hard to find.
I only tried this in VS 2012 Preview, but it might work in older versions - please speak up in the comments.
Here's how to get to it:
In 'server explorer' create a normal connection to the SQL CE database. (No diagramming options are visible...)
Then right-click a table -> "Show table data"... Wait for it...
Hit Ctrl-1.
TA-DA!!
Alternatively, Right-click in the window with the tabular data and choose "Pane" from the context menu. (I know, 'Pane' !?)
Finally, from the 'Pane' submenu click the obvious choice - "Diagram".
There you have it.
SDF Viewer is now able to create database diagrams for SQLCE databases

New visual Studio 2010 Database project and database diagrams

I am experimenting with the database project in Visual Studio 2010. The schema diff and management of scripts looks great, but where are the database diagrams? I would like to design the tables visually, but still make use of the versioning/comparison/deployment tools in VS2010. I didn't see any option in the database project to create a diagram. Is that not supported?
You could create the diagrams in SSMS (or another diagramming/modelling tool) as you would do normally, and synchronize the structure back to your Visual Studio Database Project, although you'll need the Premium or Ultimate version of Visual Studio to use this feature.
I'm not sure if this is what you are looking for,
but I suggest you add an Entity Diagram (Entity Framework) to your
project / solution. This will allow you to design/describe your data model(s)
either by drawing them visually or by importing an existing database schema.
Entity Framework information:
http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx
Tutorial (for EF 2.0 but still relevant)
http://blog.garypretty.co.uk/index.php/2009/05/20/tutorial-entity-framework-v20-model-first-using-visual-studio-2010-and-net-40/
I hope this helps you get started
There certainly is diagramming support.
Open the "Server Explorer"
Create/open a data connection.
You should see "Database Diagrams", which will function very similarly to the same function in SQL Server Management Studio.
Bam.
Note, I'm referring to V2010 Ultimate.

Resources