public ExtendedDataBase(string connectionString) : base(EntityConnectionWrapperUtils.CreateEntityConnectionWithWrappers( connectionString, "EFTracingProvider", "EFCachingProvider" ), false) { }
public ExtendedNorthwindEntities(string connectionString) : base(EntityConnectionWrapperUtils.CreateEntityConnectionWithWrappers( connectionString, "EFTracingProvider", "EFCachingProvider" )) { }
public RentlerBackupEntitiesExtensions(string connectionString) : base(EntityConnectionWrapperUtils.CreateEntityConnectionWithWrappers( connectionString, "EFTracingProvider", "EFCachingProvider" )) { }
public static DbConnection GetConnection(string nameOrConnectionString) { try { // this only supports entity connection strings http://msdn.microsoft.com/en-us/library/cc716756.aspx return(EntityConnectionWrapperUtils.CreateEntityConnectionWithWrappers(nameOrConnectionString, "EFTracingProvider", "EFCachingProvider")); } catch (ArgumentException ex) { if (nameOrConnectionString.Contains('=')) { nameOrConnectionString = nameOrConnectionString.Substring(nameOrConnectionString.IndexOf('=') + 1); } // an invalid entity connection string is assumed to be a normal connection string name or connection string (Code First) ConnectionStringSettings connectionStringSetting = ConfigurationManager.ConnectionStrings[nameOrConnectionString]; string connectionString; string providerName; if (connectionStringSetting != null) { connectionString = connectionStringSetting.ConnectionString; providerName = connectionStringSetting.ProviderName; } else { providerName = "System.Data.SqlClient"; connectionString = nameOrConnectionString; } var connect = EFConnectionWrapperFactory.GetConnection(); var wrapperConnectionString = String.Format(@"wrappedProvider={0};{1}", providerName, connectionString); connect.ConnectionString = wrapperConnectionString; return(connect); } }
public BrickHouseFitnessContext(): base(EntityConnectionWrapperUtils.CreateEntityConnectionWithWrappers(ConfigurationManager.ConnectionStrings["BrickHouseFitnessContext"].ConnectionString, "EFTracingProvider"), true) { }
public LoggedContext(string connectionString) : base(EntityConnectionWrapperUtils.CreateEntityConnectionWithWrappers(connectionString) { }