2013-03-06 98 views
1

是否有可能将数据库名称设置为RIA Services的DomainService数据库名称和RIA服务

即我有

public partial class MyAppDomainService : LinqToEntitiesDomainService<MyAppEntities> 

此行this.ObjectContext.Connection.Database不会有任何挪用的信息。

我该如何得到它?

回答

1

Linq to Entities使用实际数据源连接之间的概念模型。 您在寻找的是:

((System.Data.EntityClient.EntityConnection)this.ObjectContext.Connection).StoreConnection.Database