make a new .edmx by adding a new file and browsing to Visual C# > Data > ADO.NET Entity Data Model where Model1.edmx is the default name I suppose
C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data ...contains test.mdf which I want to use. I stepped through the wizard to make the connection and was told that the .mdf was being used by another process. I restarted my laptop and tried again. This ended up in Web.Config:
<add name="testEntities" connectionString="metadata=res://*/Models.Model1.csdl|res://*/Models.Model1.ssdl|res://*/Models.Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=.\SQLEXPRESS;attachdbfilename=|DataDirectory|\test.mdf;integrated security=True;connect timeout=30;user instance=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings>
No comments:
Post a Comment