如何在域服务构造函数中更改 this.ObjectContext.Connection?
我使用多数据模型和多域服务。
...
<add name="PermissionEntities" connectionString="metadata=res://*/Entities.General.Permission.csdl|res://*/Entities.General.Permission.ssdl|res://*/Entities.General.Permission.msl;provider=System.Data.SqlClient;provider connection string="Data Source=10.10.10.10;initial catalog=Development;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" />
<add name="ProfileEntities" connectionString="metadata=res://*/Entities.General.Profile.csdl|res://*/Entities.General.Profile.ssdl|res://*/Entities.General.Profile.msl;provider=System.Data.SqlClient;provider connection string="Data Source=10.10.10.10;initial catalog=Development;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" />
...
我想在运行时在域服务构造函数中更改 '.csdl' 、 '.ssdl' 、 '.msl' 。