Permalink
Browse files

Modded the table factory methods to take IConnectionManager

  • Loading branch information...
1 parent 46a9879 commit 3dc795da0e52c9f801bcfcf4a324087237a8dfcd @mikeobrien committed May 21, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Gribble/Table.cs
View
@@ -36,7 +36,7 @@ public static ITable<TEntity> Create<TKey>(SqlConnection connection, string tabl
return Create<TKey>(new ConnectionManager(connection, commandTimeout ?? new TimeSpan(0, 5, 0)), keyColumn, tableName, profiler ?? new ConsoleProfiler());
}
- public static ITable<TEntity> Create<TKey>(ConnectionManager connectionManager, string tableName, string keyColumn, IProfiler profiler = null)
+ public static ITable<TEntity> Create<TKey>(IConnectionManager connectionManager, string tableName, string keyColumn, IProfiler profiler = null)
{
var mapping = new EntityMapping(typeof(Guid) == typeof(TKey) ? new GuidKeyEntityMap(keyColumn) : (typeof(int) == typeof(TKey) ? (IClassMap)new IntKeyEntityMap(keyColumn) : null));
return new Table<TEntity>(connectionManager, tableName, mapping, profiler ?? new ConsoleProfiler());
@@ -47,7 +47,7 @@ public static ITable<TEntity> Create(SqlConnection connection, string tableName,
return Create(new ConnectionManager(connection, commandTimeout ?? new TimeSpan(0, 5, 0)), tableName, entityMapping, profiler ?? new ConsoleProfiler());
}
- public static ITable<TEntity> Create(ConnectionManager connectionManager, string tableName, IEntityMapping entityMapping, IProfiler profiler = null)
+ public static ITable<TEntity> Create(IConnectionManager connectionManager, string tableName, IEntityMapping entityMapping, IProfiler profiler = null)
{
return new Table<TEntity>(connectionManager, tableName, entityMapping, profiler ?? new ConsoleProfiler());
}

0 comments on commit 3dc795d

Please sign in to comment.