Interface IDatabase
Inherited Members
System.IDisposable.Dispose()
Assembly: DapperExtensions.StrongName.dll
Syntax
public interface IDatabase : IDisposable
Properties
|
Improve this Doc
View Source
Connection
Declaration
DbConnection Connection { get; }
Property Value
Type |
Description |
System.Data.Common.DbConnection |
|
|
Improve this Doc
View Source
HasActiveTransaction
Declaration
bool HasActiveTransaction { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
BeginTransaction(IsolationLevel)
Declaration
void BeginTransaction(IsolationLevel isolationLevel = IsolationLevel.ReadCommitted)
Parameters
Type |
Name |
Description |
System.Data.IsolationLevel |
isolationLevel |
|
|
Improve this Doc
View Source
ClearCache()
Declaration
|
Improve this Doc
View Source
Commit()
Declaration
|
Improve this Doc
View Source
Count<T>(Object, DbTransaction, Nullable<Int32>)
Declaration
int Count<T>(object predicate, DbTransaction transaction, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
|
Improve this Doc
View Source
Count<T>(Object, Nullable<Int32>)
Declaration
int Count<T>(object predicate, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
|
Improve this Doc
View Source
Delete<T>(T, DbTransaction, Nullable<Int32>)
Declaration
bool Delete<T>(T entity, DbTransaction transaction, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
T |
entity |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
Delete<T>(T, Nullable<Int32>)
Declaration
bool Delete<T>(T entity, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
T |
entity |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
Delete<T>(Object, DbTransaction, Nullable<Int32>)
Declaration
bool Delete<T>(object predicate, DbTransaction transaction, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
Delete<T>(Object, Nullable<Int32>)
Declaration
bool Delete<T>(object predicate, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
Get<T>(Object, DbTransaction, Nullable<Int32>)
Declaration
T Get<T>(dynamic id, DbTransaction transaction, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
id |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Get<T>(Object, Nullable<Int32>)
Declaration
T Get<T>(dynamic id, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
id |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetList<T>(Object, IList<ISort>, DbTransaction, Nullable<Int32>, Boolean)
Declaration
IEnumerable<T> GetList<T>(object predicate, IList<ISort> sort, DbTransaction transaction, int? commandTimeout = null, bool buffered = true)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Collections.Generic.IList<ISort> |
sort |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
System.Boolean |
buffered |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
Improve this Doc
View Source
GetList<T>(Object, IList<ISort>, Nullable<Int32>, Boolean)
Declaration
IEnumerable<T> GetList<T>(object predicate = null, IList<ISort> sort = null, int? commandTimeout = null, bool buffered = true)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Collections.Generic.IList<ISort> |
sort |
|
System.Nullable<System.Int32> |
commandTimeout |
|
System.Boolean |
buffered |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
Improve this Doc
View Source
GetMap<T>()
Declaration
IClassMapper GetMap<T>()
where T : class
Returns
Type Parameters
|
Improve this Doc
View Source
GetMultiple(GetMultiplePredicate, DbTransaction, Nullable<Int32>)
Declaration
IMultipleResultReader GetMultiple(GetMultiplePredicate predicate, DbTransaction transaction, int? commandTimeout = null)
Parameters
Type |
Name |
Description |
GetMultiplePredicate |
predicate |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
|
Improve this Doc
View Source
GetMultiple(GetMultiplePredicate, Nullable<Int32>)
Declaration
IMultipleResultReader GetMultiple(GetMultiplePredicate predicate, int? commandTimeout = null)
Parameters
Returns
|
Improve this Doc
View Source
GetNextGuid()
Declaration
Returns
Type |
Description |
System.Guid |
|
|
Improve this Doc
View Source
GetPage<T>(Object, IList<ISort>, Int32, Int32, DbTransaction, Nullable<Int32>, Boolean)
Declaration
IEnumerable<T> GetPage<T>(object predicate, IList<ISort> sort, int page, int resultsPerPage, DbTransaction transaction, int? commandTimeout = null, bool buffered = true)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Collections.Generic.IList<ISort> |
sort |
|
System.Int32 |
page |
|
System.Int32 |
resultsPerPage |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
System.Boolean |
buffered |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
Improve this Doc
View Source
GetPage<T>(Object, IList<ISort>, Int32, Int32, Nullable<Int32>, Boolean)
Declaration
IEnumerable<T> GetPage<T>(object predicate, IList<ISort> sort, int page, int resultsPerPage, int? commandTimeout = null, bool buffered = true)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Collections.Generic.IList<ISort> |
sort |
|
System.Int32 |
page |
|
System.Int32 |
resultsPerPage |
|
System.Nullable<System.Int32> |
commandTimeout |
|
System.Boolean |
buffered |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
Improve this Doc
View Source
GetSet<T>(Object, IList<ISort>, Int32, Int32, DbTransaction, Nullable<Int32>, Boolean)
Declaration
IEnumerable<T> GetSet<T>(object predicate, IList<ISort> sort, int firstResult, int maxResults, DbTransaction transaction, int? commandTimeout, bool buffered)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Collections.Generic.IList<ISort> |
sort |
|
System.Int32 |
firstResult |
|
System.Int32 |
maxResults |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
System.Boolean |
buffered |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
Improve this Doc
View Source
GetSet<T>(Object, IList<ISort>, Int32, Int32, Nullable<Int32>, Boolean)
Declaration
IEnumerable<T> GetSet<T>(object predicate, IList<ISort> sort, int firstResult, int maxResults, int? commandTimeout, bool buffered)
where T : class
Parameters
Type |
Name |
Description |
System.Object |
predicate |
|
System.Collections.Generic.IList<ISort> |
sort |
|
System.Int32 |
firstResult |
|
System.Int32 |
maxResults |
|
System.Nullable<System.Int32> |
commandTimeout |
|
System.Boolean |
buffered |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
|
Improve this Doc
View Source
Insert<T>(T, DbTransaction, Nullable<Int32>)
Declaration
dynamic Insert<T>(T entity, DbTransaction transaction, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
T |
entity |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Object |
|
Type Parameters
|
Improve this Doc
View Source
Insert<T>(T, Nullable<Int32>)
Declaration
dynamic Insert<T>(T entity, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
T |
entity |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Object |
|
Type Parameters
|
Improve this Doc
View Source
Insert<T>(IEnumerable<T>, DbTransaction, Nullable<Int32>)
Declaration
void Insert<T>(IEnumerable<T> entities, DbTransaction transaction, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
entities |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Type Parameters
|
Improve this Doc
View Source
Insert<T>(IEnumerable<T>, Nullable<Int32>)
Declaration
void Insert<T>(IEnumerable<T> entities, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
entities |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Type Parameters
|
Improve this Doc
View Source
Rollback()
Declaration
|
Improve this Doc
View Source
RunInTransaction(Action)
Declaration
void RunInTransaction(Action action)
Parameters
Type |
Name |
Description |
System.Action |
action |
|
|
Improve this Doc
View Source
RunInTransaction<T>(Func<T>)
Declaration
T RunInTransaction<T>(Func<T> func)
Parameters
Type |
Name |
Description |
System.Func<T> |
func |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Update<T>(T, DbTransaction, Nullable<Int32>)
Declaration
bool Update<T>(T entity, DbTransaction transaction, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
T |
entity |
|
System.Data.Common.DbTransaction |
transaction |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
|
Improve this Doc
View Source
Update<T>(T, Nullable<Int32>)
Declaration
bool Update<T>(T entity, int? commandTimeout = null)
where T : class
Parameters
Type |
Name |
Description |
T |
entity |
|
System.Nullable<System.Int32> |
commandTimeout |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters