Saturday, April 11, 2015

Cannot create file 'entityFmTest.mdf' because it already exists. Change the file path or the file name, and retry the operation.


< add connectionstring="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\entityFmTest.mdf; Integrated Security=True;User Instance=True;" name="entityFmContext" providername="System.Data.SqlClient">
< /add>

CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Cannot create file 'entityFmTest.mdf' because it already exists. Change the file path or the file name, and retry the operation.
replace the above with

replace the above connection string with below

< add connectionstring="data source=.\SQLEXPRESS;Initial Catalog=entityFmTest; Integrated Security=SSPI;User Instance=true" name="entityFmContext" providername="System.Data.SqlClient">
< /add>