Show / Hide Table of Contents

Class DapperRepository<TDbContext>

Inheritance
object
DapperRepository<TDbContext>
PersonDapperRepository
Implements
IDapperRepository
IUnitOfWorkEnabled
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.Domain.Repositories.Dapper
Assembly: Volo.Abp.Dapper.dll
Syntax
public class DapperRepository<TDbContext> : IDapperRepository, IUnitOfWorkEnabled where TDbContext : IEfCoreDbContext
Type Parameters
Name Description
TDbContext

Constructors

DapperRepository(IDbContextProvider<TDbContext>)

Declaration
public DapperRepository(IDbContextProvider<TDbContext> dbContextProvider)
Parameters
Type Name Description
IDbContextProvider<TDbContext> dbContextProvider

Properties

CancellationTokenProvider

Declaration
public ICancellationTokenProvider CancellationTokenProvider { get; }
Property Value
Type Description
ICancellationTokenProvider

CurrentTenant

Declaration
public ICurrentTenant CurrentTenant { get; }
Property Value
Type Description
ICurrentTenant

DataFilter

Declaration
public IDataFilter DataFilter { get; }
Property Value
Type Description
IDataFilter

DbConnection

Declaration
[Obsolete("Use GetDbConnectionAsync method.")]
public IDbConnection DbConnection { get; }
Property Value
Type Description
IDbConnection

DbTransaction

Declaration
[Obsolete("Use GetDbTransactionAsync method.")]
public IDbTransaction? DbTransaction { get; }
Property Value
Type Description
IDbTransaction

LazyServiceProvider

Declaration
public IAbpLazyServiceProvider LazyServiceProvider { get; set; }
Property Value
Type Description
IAbpLazyServiceProvider

UnitOfWorkManager

Declaration
public IUnitOfWorkManager UnitOfWorkManager { get; }
Property Value
Type Description
IUnitOfWorkManager

Methods

GetCancellationToken(CancellationToken)

Declaration
protected virtual CancellationToken GetCancellationToken(CancellationToken preferredValue = default)
Parameters
Type Name Description
CancellationToken preferredValue
Returns
Type Description
CancellationToken

GetDbConnectionAsync()

Declaration
public virtual Task<IDbConnection> GetDbConnectionAsync()
Returns
Type Description
Task<IDbConnection>

GetDbTransactionAsync()

Declaration
public virtual Task<IDbTransaction?> GetDbTransactionAsync()
Returns
Type Description
Task<IDbTransaction>

Implements

IDapperRepository
IUnitOfWorkEnabled

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform