Last post Oct 09, 2014 05:25 AM by code_freezer
Oct 08, 2014 10:10 PM|code_freezer|LINK
I'm a newbie to Entity framework.I'm working on a MVC4 application.So i could create a .mdf file inside App_Data folder using entity framework.So i have installed SQL Server 2012 express in my machine.I want to use it to store my DB.I mean store the data
on my sql server not on a .mdf file indside the application.
Oct 09, 2014 02:24 AM|Mikesdotnetting|LINK
Make sure your connection string points to a database attached to the SQL Server instance. Don't use the AttachDbFile option.
Oct 09, 2014 04:17 AM|code_freezer|LINK
First thanks for the reply on my question :) Please can you explain it more?You mean in web.config file i have to points to a database attached to SQL server?Entity framework creates the database itself on the fly of the application.Am i correct?So if it's
how i can create a database manually?Sorry i'm asking this because i'm novice to EF.
Oct 09, 2014 04:51 AM|Mikesdotnetting|LINK
EF will only generate a connection string on the fly if you don't specify one. You create the connection string in your web.config. More instructions can be found here: http://msdn.microsoft.com/en-us/data/jj592674
Oct 09, 2014 05:25 AM|code_freezer|LINK
ok.thanks i'll check that.