Interface IWritableRepository<TEntity, TKey>
- Namespace
- Savvyio.Domain
- Assembly
- Savvyio.Core.dll
Defines a generic way of abstracting writable repositories (CrUd).
public interface IWritableRepository<in TEntity, TKey> : IRepository<TEntity, TKey> where TEntity : class, IIdentity<TKey>
Type Parameters
TEntity
The type of the entity.
TKey
The type of the key that uniquely identifies the entity.
Methods
Add(TEntity)
Marks the specified entity
to be added in the data store when SaveChangesAsync(Action<AsyncOptions>) is called.
void Add(TEntity entity)
Parameters
entity
TEntityThe entity to add.
AddRange(IEnumerable<TEntity>)
Marks the specified entities
to be added in the data store when SaveChangesAsync(Action<AsyncOptions>) is called.
void AddRange(IEnumerable<TEntity> entities)
Parameters
entities
IEnumerable<TEntity>The entities to add.
See Also
IRepository<TEntity, TKey>