Show / Hide Table of Contents

Interface IEfCoreDbContext

Inherited Members
System.IDisposable.Dispose()
System.IAsyncDisposable.DisposeAsync()
Namespace: Volo.Abp.EntityFrameworkCore
Assembly: Volo.Abp.EntityFrameworkCore.dll
Syntax
public interface IEfCoreDbContext : IDisposable, IInfrastructure<IServiceProvider>, IDbContextDependencies, IDbSetCache, IDbContextPoolable, IResettableService, IAsyncDisposable

Properties

ChangeTracker

Declaration
ChangeTracker ChangeTracker { get; }
Property Value
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.ChangeTracker

Database

Declaration
DatabaseFacade Database { get; }
Property Value
Type Description
Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade

Methods

Add(object)

Declaration
EntityEntry Add(object entity)
Parameters
Type Name Description
object entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry

Add<TEntity>(TEntity)

Declaration
EntityEntry<TEntity> Add<TEntity>(TEntity entity) where TEntity : class
Parameters
Type Name Description
TEntity entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<><TEntity>
Type Parameters
Name Description
TEntity

AddAsync(object, CancellationToken)

Declaration
ValueTask<EntityEntry> AddAsync(object entity, CancellationToken cancellationToken = default)
Parameters
Type Name Description
object entity
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.ValueTask<TResult><Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry>

AddAsync<TEntity>(TEntity, CancellationToken)

Declaration
ValueTask<EntityEntry<TEntity>> AddAsync<TEntity>(TEntity entity, CancellationToken cancellationToken = default) where TEntity : class
Parameters
Type Name Description
TEntity entity
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.ValueTask<TResult><Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<><TEntity>>
Type Parameters
Name Description
TEntity

AddRange(IEnumerable<object>)

Declaration
void AddRange(IEnumerable<object> entities)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><object> entities

AddRange(params object[])

Declaration
void AddRange(params object[] entities)
Parameters
Type Name Description
object[] entities

AddRangeAsync(IEnumerable<object>, CancellationToken)

Declaration
Task AddRangeAsync(IEnumerable<object> entities, CancellationToken cancellationToken = default)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><object> entities
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

AddRangeAsync(params object[])

Declaration
Task AddRangeAsync(params object[] entities)
Parameters
Type Name Description
object[] entities
Returns
Type Description
System.Threading.Tasks.Task

Attach(object)

Declaration
EntityEntry Attach(object entity)
Parameters
Type Name Description
object entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry

Attach<TEntity>(TEntity)

Declaration
EntityEntry<TEntity> Attach<TEntity>(TEntity entity) where TEntity : class
Parameters
Type Name Description
TEntity entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<><TEntity>
Type Parameters
Name Description
TEntity

AttachRange(IEnumerable<object>)

Declaration
void AttachRange(IEnumerable<object> entities)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><object> entities

AttachRange(params object[])

Declaration
void AttachRange(params object[] entities)
Parameters
Type Name Description
object[] entities

Entry(object)

Declaration
EntityEntry Entry(object entity)
Parameters
Type Name Description
object entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry

Entry<TEntity>(TEntity)

Declaration
EntityEntry<TEntity> Entry<TEntity>(TEntity entity) where TEntity : class
Parameters
Type Name Description
TEntity entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<><TEntity>
Type Parameters
Name Description
TEntity

Find(Type, params object[])

Declaration
object Find(Type entityType, params object[] keyValues)
Parameters
Type Name Description
System.Type entityType
object[] keyValues
Returns
Type Description
object

Find<TEntity>(params object[])

Declaration
TEntity Find<TEntity>(params object[] keyValues) where TEntity : class
Parameters
Type Name Description
object[] keyValues
Returns
Type Description
TEntity
Type Parameters
Name Description
TEntity

FindAsync(Type, object[], CancellationToken)

Declaration
ValueTask<object> FindAsync(Type entityType, object[] keyValues, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Type entityType
object[] keyValues
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.ValueTask<TResult><object>

FindAsync(Type, params object[])

Declaration
ValueTask<object> FindAsync(Type entityType, params object[] keyValues)
Parameters
Type Name Description
System.Type entityType
object[] keyValues
Returns
Type Description
System.Threading.Tasks.ValueTask<TResult><object>

FindAsync<TEntity>(object[], CancellationToken)

Declaration
ValueTask<TEntity> FindAsync<TEntity>(object[] keyValues, CancellationToken cancellationToken) where TEntity : class
Parameters
Type Name Description
object[] keyValues
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.ValueTask<TResult><TEntity>
Type Parameters
Name Description
TEntity

FindAsync<TEntity>(params object[])

Declaration
ValueTask<TEntity> FindAsync<TEntity>(params object[] keyValues) where TEntity : class
Parameters
Type Name Description
object[] keyValues
Returns
Type Description
System.Threading.Tasks.ValueTask<TResult><TEntity>
Type Parameters
Name Description
TEntity

Remove(object)

Declaration
EntityEntry Remove(object entity)
Parameters
Type Name Description
object entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry

Remove<TEntity>(TEntity)

Declaration
EntityEntry<TEntity> Remove<TEntity>(TEntity entity) where TEntity : class
Parameters
Type Name Description
TEntity entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<><TEntity>
Type Parameters
Name Description
TEntity

RemoveRange(IEnumerable<object>)

Declaration
void RemoveRange(IEnumerable<object> entities)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><object> entities

RemoveRange(params object[])

Declaration
void RemoveRange(params object[] entities)
Parameters
Type Name Description
object[] entities

SaveChanges()

Declaration
int SaveChanges()
Returns
Type Description
int

SaveChanges(bool)

Declaration
int SaveChanges(bool acceptAllChangesOnSuccess)
Parameters
Type Name Description
bool acceptAllChangesOnSuccess
Returns
Type Description
int

SaveChangesAsync(bool, CancellationToken)

Declaration
Task<int> SaveChangesAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool acceptAllChangesOnSuccess
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><int>

SaveChangesAsync(CancellationToken)

Declaration
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><int>

SaveChangesOnDbContextAsync(bool, CancellationToken)

Declaration
Task<int> SaveChangesOnDbContextAsync(bool acceptAllChangesOnSuccess, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool acceptAllChangesOnSuccess
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<TResult><int>

Set<T>()

Declaration
DbSet<T> Set<T>() where T : class
Returns
Type Description
Microsoft.EntityFrameworkCore.DbSet<><T>
Type Parameters
Name Description
T

Update(object)

Declaration
EntityEntry Update(object entity)
Parameters
Type Name Description
object entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry

Update<TEntity>(TEntity)

Declaration
EntityEntry<TEntity> Update<TEntity>(TEntity entity) where TEntity : class
Parameters
Type Name Description
TEntity entity
Returns
Type Description
Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry<><TEntity>
Type Parameters
Name Description
TEntity

UpdateRange(IEnumerable<object>)

Declaration
void UpdateRange(IEnumerable<object> entities)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><object> entities

UpdateRange(params object[])

Declaration
void UpdateRange(params object[] entities)
Parameters
Type Name Description
object[] entities

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
In This Article
Back to top Powered by Volosoft