Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to connect to SqlExpress for Entity Framework using Visual Studio 2010 Express?

I'm trying to use the Visual Studio 2010 Express editions to set up an ASP.NET MVC 2 Web Application using SqlExpress + Entity Framework as the data access. I have both the "C# Edition" and "Web Developer Edition" installed.

If I try to add a data source using the "C# edition", I'm missing the "Microsoft SQL Server" data source type.

Visual Studio 2010 Express Screenshot http://dl.dropbox.com/u/4163528/images/StackOverflow/2010Express.png

but Visual Studio 2008 Professional has it.

Visual Studio 2008 Professional Screenshot http://dl.dropbox.com/u/4163528/images/StackOverflow/2008Professional.png

as noted by another StackOverflow question, the "Web Developer Edition" has this. However, the Web Developer Edition doesn't support the Entity Framework items: EntityFramework http://dl.dropbox.com/u/4163528/images/StackOverflow/2010EF.png.

I'd want to stick with only the Express Editions. Is my use case one that Microsoft forgot about? What can I do here to use SqlExpress + MVC 2 + Entity Framework?

Thanks!

-Mike

like image 745
Mike Avatar asked Apr 26 '10 01:04

Mike


People also ask

How do I connect to a remote SQL Server in Visual Studio?

Right click on 'Data Connections' then click 'Add Connection'. On the next screen (Choose Data Source) change the data source ensure 'Microsoft SQL Server' is selected then click the 'Continue' button. In the 'Server name' field enter 'SQL-SERVER'. Change the 'Authentication' method to 'SQL Server Authentication'.


1 Answers

You should be able to select SQL Server Database File, then change the connection string to connect to SqlExpress.

like image 99
SLaks Avatar answered Sep 20 '22 10:09

SLaks