Overview ; Entity Framework 연결시 오류
edmx 파일명을 정확이 App.confg 에 세팅 해준다.
예) <add name=”REGEntities” connectionString=”metadata=res://*/Variable.csdl|res://*/Variable.ssdl|res://*/Variable.msl;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> </startup> <connectionStrings> <add name="REGEntities" connectionString="metadata=res://*/Variable.csdl|res://*/Variable.ssdl|res://*/Variable.msl;provider=System.Data.SqlClient;provider connection string="data source=111.111.111.111C;initial catalog=REG;user id=REG;password=mypasswd011;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" /> </connectionStrings> <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <providers> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> </providers> </entityFramework> <!--AppSettings> <add key="CacheTime" value="60"/> </AppSettings--> <appSettings> <add key="CacheTime" value="200"/> </appSettings> </configuration> |
1 2 3 |