Browse
interface
IRepository<TEntity>
publicnamespace Core.Data.Repositories;
public interface IRepository<TEntity>
where TEntity : classDefines the standard data access operations for an aggregate.
TEntity—The entity type managed by the repository.
Methods
#
Task<TEntity> AddAsync(
TEntity entity,
CancellationToken cancellationToken = default
)Asynchronously adds a new entity to the repository.
entity—The entity instance to be inserted.
cancellationToken—A token to observe for cancellation requests.
returns—The inserted entity with any database-generated values applied.
#
void Update(TEntity entity)Begins tracking the given entity using the Modified state.
entity—The entity instance to update.