Extract connection string from an Entity Connection String

前端 未结 5 571
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 09:50

When creating and ADO.NET Entity Connection String you get something like



        
5条回答
  •  不思量自难忘°
    2021-02-05 10:00

    We can use the following code to extract connection string only from entity framework connection string without metadata information.

    string connectionString = new MREntities().Database.Connection.ConnectionString
    

提交回复
热议问题