Interface IRepository<TEntity>
Interface for a generic entity repository.
Inherited Members
Namespace: Fibula.Data.Contracts.Abstractions
Assembly: Fibula.Data.Contracts.dll
Syntax
public interface IRepository<TEntity> : IReadOnlyRepository<TEntity> where TEntity : IIdentifiableEntity
Type Parameters
Name | Description |
---|---|
TEntity | The entity type. |
Methods
| Improve this Doc View SourceAdd(TEntity)
Adds an entity to the repository.
Declaration
void Add(TEntity entity)
Parameters
Type | Name | Description |
---|---|---|
TEntity | entity | The entity to add. |
AddRange(IEnumerable<TEntity>)
Adds multiple entities to the respository.
Declaration
void AddRange(IEnumerable<TEntity> entities)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEntity> | entities | The entities to add. |
Remove(TEntity)
Removes an entity from the repository.
Declaration
void Remove(TEntity entity)
Parameters
Type | Name | Description |
---|---|---|
TEntity | entity | The entity to remove. |
RemoveRange(IEnumerable<TEntity>)
Removes multiple entities from the repository.
Declaration
void RemoveRange(IEnumerable<TEntity> entities)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TEntity> | entities | The entities to remove. |