C# – Entity Framework Connection wizard cant find the Database

centity-frameworksql server

I have a unexpected problem.

I create a database on Sql Server 2012. I want to connect this database using Entity Framework on Visual Studio 2012. But Entity framework wizard can't find Servers.

The steps that I followed;

I clicked to "add New İtem ->Add Ado.Net Entity Data Model.

  1. I chose "Generate From Database" on "model content" page. Clicked Next.
  2. On "choose your model connection" page, I clicked "New connection" button. After this, a new window opened.
  3. On this window, I chose "Microsoft Sql Server" as data source and ".Net Framework Provider for sql server" as data provider. Clicked Continue.
  4. After all of them, a window named as "Connection Properties" opened.

On this page, I have to choose Server Name. Unfortunately, there is no Server Name on server name combobox. I refreshed the list of servers. Still, the list is empty. But, I know I have a server. I worked on this. But the Entity Framework wizard can't find it.

Do you have any idea to overcome this problem ?

Thanks!

Best Answer

  1. Manually enter the server name and then click on databases
  2. Ideally it should find the list of servers but sometimes it will not, so enter it manually.
  3. Try and verify that from your system you can connect to the database? If not I think you need to enable some SQL services.