Pregunta

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?

¿Fue útil?

Solución

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
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top