-
-
Notifications
You must be signed in to change notification settings - Fork 0
easyextensionsentityframeworkcoredatabaserepository IRepositoryT
Represents a generic repository interface for accessing and manipulating entities of type TItem.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph EasyExtensions.EntityFrameworkCore.Abstractions
EasyExtensions.EntityFrameworkCore.Abstractions.BaseEntity[[BaseEntity]]
class EasyExtensions.EntityFrameworkCore.Abstractions.BaseEntity abstractStyle;
end
subgraph EasyExtensions.EntityFrameworkCore.Database.Repository
EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository_1[[IRepository< TItem >]]
class EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository_1 interfaceStyle;
EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository_1TItem((TItem));
EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository_1 -- where --o EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository_1TItem
EasyExtensions.EntityFrameworkCore.Abstractions.BaseEntity --> EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository_1TItem
EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository[[IRepository]]
class EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository interfaceStyle;
end
EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository --> EasyExtensions.EntityFrameworkCore.Database.Repository.IRepository_1
| Returns | Name |
|---|---|
Task<TItem> |
CreateAsync(TItem item) |
Task<bool> |
DeleteAsync(TItem item) |
Task<int> |
DeleteRangeAsync(IEnumerable<TItem> items) |
Task<Paging<TItem>> |
FilterAsync(...)Filters and paginates the entities asynchronously based on the specified query. |
Task<IEnumerable<TItem>> |
FindAsync(Expression<Func<TItem, bool>> predicate) |
Task<TItem> |
GetByIdAsync(int id)Retrieves an entity by its ID asynchronously. |
Task<IList<TItem>> |
ListAsync(...) |
IQueryable<TItem> |
Query()Returns an IQueryable<ModularDoc.Elements.Markdown.TextElement> of entities. |
Task<TItem> |
UpdateAsync(TItem item) |
Represents a generic repository interface for accessing and manipulating entities of type TItem.
| Type | Description | Constraints |
|---|---|---|
TItem |
The type of entity. | BaseEntity |
public Task<TItem> GetByIdAsync(int id)| Type | Name | Description |
|---|---|---|
int |
id | The ID of the entity. |
Retrieves an entity by its ID asynchronously.
A task that represents the asynchronous operation. The task result contains the entity with the specified ID.
public Task<TItem> CreateAsync(TItem item)| Type | Name | Description |
|---|---|---|
TItem |
item |
public Task<bool> DeleteAsync(TItem item)| Type | Name | Description |
|---|---|---|
TItem |
item |
public Task<int> DeleteRangeAsync(IEnumerable<TItem> items)| Type | Name | Description |
|---|---|---|
IEnumerable<TItem> |
items |
public Task<TItem> UpdateAsync(TItem item)| Type | Name | Description |
|---|---|---|
TItem |
item |
public Task<Paging<TItem>> FilterAsync(IGridifyQuery query)| Type | Name | Description |
|---|---|---|
IGridifyQuery |
query | The query parameters for filtering and pagination. |
Filters and paginates the entities asynchronously based on the specified query.
A task that represents the asynchronous operation. The task result contains the filtered and paginated entities.
public Task<Paging<TItem>> FilterAsync(IGridifyQuery query, IGridifyMapper<TItem> mapper)| Type | Name | Description |
|---|---|---|
IGridifyQuery |
query | |
IGridifyMapper<TItem> |
mapper |
public Task<IEnumerable<TItem>> FindAsync(Expression<Func<TItem, bool>> predicate)| Type | Name | Description |
|---|---|---|
Expression<Func<TItem, bool>> |
predicate |
public Task<IList<TItem>> ListAsync(Expression<Func<TItem, bool>> predicate)| Type | Name | Description |
|---|---|---|
Expression<Func<TItem, bool>> |
predicate |
public Task<IList<TItem>> ListAsync()Gets all entities asynchronously.
A task that represents the asynchronous operation. The task result contains a collection of all entities.
public IQueryable<TItem> Query()Returns an IQueryable<ModularDoc.Elements.Markdown.TextElement> of entities.
An IQueryable<ModularDoc.Elements.Markdown.TextElement> of entities.
Generated with ModularDoc