Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
C#
app config file.
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters><pre><pre lang="text"><pre lang="text"><pre lang="HTML">

<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>

I am using Entity framework 6 + version and i do have SqlServer 2014. As i was following the article about EF with code first and i did same but it didnt create database and tables in my SqlServer instance. should i change the parameter value and point it to my server name?
Posted
Updated 13-Jan-16 15:14pm
v2

1 solution

Now you have localdb default connection factory, try to change it as SqlConnectionFactory and give the connection string as parameter value
refer : Changing EF's default connection factory from LocalDb to Sql Server - davidobando - Site Home - MSDN Blogs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900