using System; using System.Configuration; private string GetConnectionString() { return ConfigurationManager.ConnectionStrings["MyContext"].ConnectionString; }