Class EfCoreDbSet<TEntity>
An implementation of IDbSet<TEntity> that works with Entity Framework Core.
Inheritance
System.Object
EfCoreDbSet<TEntity>
Implements
IDbSet<TEntity>
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()
Namespace: Silverback.Database
Assembly: Silverback.Core.EFCore30.dll
Syntax
public class EfCoreDbSet<TEntity> : IDbSet<TEntity> where TEntity : class
Type Parameters
Name | Description |
---|---|
TEntity | The type of the entity being stored in this set. |
Constructors
| Improve this doc View sourceEfCoreDbSet(DbSet<TEntity>)
Initializes a new instance of the EfCoreDbSet<TEntity> class.
Declaration
public EfCoreDbSet(DbSet<TEntity> dbSet)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.EntityFrameworkCore.DbSet<TEntity> | dbSet | The underlying Microsoft.EntityFrameworkCore.DbSet<TEntity>. |
Methods
| Improve this doc View sourceAdd(TEntity)
Declaration
public TEntity Add(TEntity entity)
Parameters
Type | Name | Description |
---|---|---|
TEntity | entity |
Returns
Type | Description |
---|---|
TEntity |
AsQueryable()
Declaration
public IQueryable<TEntity> AsQueryable()
Returns
Type | Description |
---|---|
System.Linq.IQueryable<TEntity> |
Find(Object[])
Declaration
public TEntity Find(params object[] keyValues)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | keyValues |
Returns
Type | Description |
---|---|
TEntity |
FindAsync(Object[])
Declaration
public async Task<TEntity> FindAsync(params object[] keyValues)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | keyValues |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TEntity> |
GetLocalCache()
Declaration
public IEnumerable<TEntity> GetLocalCache()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEntity> |
Remove(TEntity)
Declaration
public TEntity Remove(TEntity entity)
Parameters
Type | Name | Description |
---|---|---|
TEntity | entity |
Returns
Type | Description |
---|---|
TEntity |
RemoveRange(IEnumerable<TEntity>)
Declaration
public void RemoveRange(IEnumerable<TEntity> entities)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEntity> | entities |