/// <summary> /// Gets the <see cref="T:System.Data.Entity.Infrastructure.IDbExecutionStrategy" /> that will be used to execute methods that use the specified connection. /// This overload should be used by the derived classes for compatability with wrapping providers. /// </summary> /// <param name="connection">The database connection</param> /// <param name="providerInvariantName">The provider invariant name</param> /// <returns> /// A new instance of <see cref="T:System.Data.Entity.Infrastructure.DbExecutionStrategy" /> /// </returns> protected static IDbExecutionStrategy GetExecutionStrategy( DbConnection connection, string providerInvariantName) { return(DbProviderServices.GetExecutionStrategy(connection, DbProviderServices.GetProviderFactory(connection), providerInvariantName)); }
/// <summary>Returns providers given a connection.</summary> /// <returns> /// The <see cref="T:System.Data.Entity.Core.Common.DbProviderServices" /> instanced based on the specified connection. /// </returns> /// <param name="connection">Connection to provider.</param> public static DbProviderServices GetProviderServices(DbConnection connection) { return(DbProviderServices.GetProviderFactory(connection).GetProviderServices()); }
/// <summary> /// Gets the <see cref="T:System.Data.Entity.Infrastructure.IDbExecutionStrategy" /> that will be used to execute methods that use the specified connection. /// </summary> /// <param name="connection">The database connection</param> /// <returns> /// A new instance of <see cref="T:System.Data.Entity.Infrastructure.DbExecutionStrategy" /> /// </returns> public static IDbExecutionStrategy GetExecutionStrategy( DbConnection connection) { return(DbProviderServices.GetExecutionStrategy(connection, DbProviderServices.GetProviderFactory(connection), (string)null)); }