문제

Is it possible to get the database name within a DomainService of the RIA Services?

i.e. I have got

public partial class MyAppDomainService : LinqToEntitiesDomainService<MyAppEntities>

This line this.ObjectContext.Connection.Database doesn't has any appropriated information.

How do I can get it?

도움이 되었습니까?

해결책

Linq to Entities uses a conceptual model between the actual data source connection. What you are looking for is:

((System.Data.EntityClient.EntityConnection)this.ObjectContext.Connection).StoreConnection.Database
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top