Class WacRepository<TEntity, TDbContext>
Inheritance
System.Object
WacRepository<TEntity, TDbContext>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: WaCore.Data.Ef.dll
Syntax
public class WacRepository<TEntity, TDbContext> : IWacRepository<TEntity> where TEntity : class where TDbContext : DbContext
Type Parameters
Name |
Description |
TEntity |
|
TDbContext |
|
Constructors
|
Improve this Doc
View Source
WacRepository(TDbContext)
Declaration
public WacRepository(TDbContext dbContext)
Parameters
Type |
Name |
Description |
TDbContext |
dbContext |
|
Fields
|
Improve this Doc
View Source
DbContext
Declaration
protected readonly TDbContext DbContext
Field Value
Type |
Description |
TDbContext |
|
|
Improve this Doc
View Source
DbSet
Declaration
protected readonly DbSet<TEntity> DbSet
Field Value
Type |
Description |
Microsoft.EntityFrameworkCore.DbSet<TEntity> |
|
Methods
|
Improve this Doc
View Source
Add(TEntity)
Declaration
public virtual void Add(TEntity entity)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
|
Improve this Doc
View Source
Get(Object)
Declaration
public virtual TEntity Get(object id)
Parameters
Type |
Name |
Description |
System.Object |
id |
|
Returns
|
Improve this Doc
View Source
GetAll()
Declaration
public virtual IList<TEntity> GetAll()
Returns
Type |
Description |
System.Collections.Generic.IList<TEntity> |
|
|
Improve this Doc
View Source
GetAllAsync(CancellationToken)
Declaration
public virtual Task<IList<TEntity>> GetAllAsync(CancellationToken cancellationToken = default (CancellationToken))
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IList<TEntity>> |
|
|
Improve this Doc
View Source
GetAsync(Object, CancellationToken)
Declaration
public virtual Task<TEntity> GetAsync(object id, CancellationToken cancellationToken = default (CancellationToken))
Parameters
Type |
Name |
Description |
System.Object |
id |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<TEntity> |
|
|
Improve this Doc
View Source
Remove(TEntity)
Declaration
public virtual void Remove(TEntity entity)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
|
Improve this Doc
View Source
Update(TEntity)
Declaration
public virtual void Update(TEntity entity)
Parameters
Type |
Name |
Description |
TEntity |
entity |
|
Implements