static UsersController() { const string metaData = "res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl"; const string appName = "EntityFramework"; const string providerName = "System.Data.SqlClient"; EntityConnectionStringBuilder efBuilder = new EntityConnectionStringBuilder(); efBuilder.Metadata = metaData; efBuilder.Provider = providerName; efBuilder.ProviderConnectionString = Util.EncryptSecret; db = new InsuranceEntities(efBuilder.ConnectionString); }
static UsersController() { const string metaData = "res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl"; const string appName = "EntityFramework"; const string providerName = "System.Data.SqlClient"; EntityConnectionStringBuilder efBuilder = new EntityConnectionStringBuilder(); efBuilder.Metadata = metaData; efBuilder.Provider = providerName; efBuilder.ProviderConnectionString = Util.EncryptSecret; db = new InsuranceEntities(efBuilder.ConnectionString); db.Configuration.LazyLoadingEnabled = false; db.Configuration.ProxyCreationEnabled = false; db.Configuration.ValidateOnSaveEnabled = false; }