Owneat Technical Guide main Help

Class CategoryRepository

Namespace: Restaurant.Infrastructure.Repositories
Assembly: Restaurant.Infrastructure.dll

public sealed class CategoryRepository : Repository<Category, RestaurantContext>, ICategoryRepository, IRepository<Category>

Inheritance

object ← Repository<Category, RestaurantContext\> ← CategoryRepository

Implements

ICategoryRepository, IRepository<Category\>

Inherited Members

Repository<Category, RestaurantContext\>.GetAllAsync\(\), Repository<Category, RestaurantContext\>.GetByIdAsync\(Guid\), Repository<Category, RestaurantContext\>.GetByIdAsyncWithConcurrency\(Guid\), Repository<Category, RestaurantContext\>.Add\(Category\), Repository<Category, RestaurantContext\>.Update\(Category\), Repository<Category, RestaurantContext\>.UpdateRange\(IEnumerable<Category\>\), Repository<Category, RestaurantContext\>.Delete\(Category\), Repository<Category, RestaurantContext\>.DeleteRange\(IEnumerable<Category\>\), Repository<Category, RestaurantContext\>.Exists\(Func<Category, bool\>\), object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Constructors

CategoryRepository\(RestaurantContext\)

public CategoryRepository(RestaurantContext context)

Parameters

context RestaurantContext

Methods

GetAsync\(Expression<Func<Category, bool\>\>\)

Method that get an entity of type Restaurant.Domain.Aggregates.CategoryAggregate.Category in the database that satisfy given System.Linq.Expressions.Expression.

public Task<Category?> GetAsync(Expression<Func<Category, bool>> expression)

Parameters

expression Expression < Func <Category, bool \>\>

Returns

Task <Category?\>

Remarks

This method includes related entities.

GetByGuidListAsync\(IEnumerable<Guid\>\)

Method that get a list of type Restaurant.Domain.Aggregates.CategoryAggregate.Category in the database that satisfy given System.Linq.Expressions.Expression.

public Task<IEnumerable<Category>> GetByGuidListAsync(IEnumerable<Guid> productIds)

Parameters

productIds IEnumerable < Guid \>

Returns

Task < IEnumerable <Category\>\>

GetListAsync\(Expression<Func<Category, bool\>\>\)

Method that get a list of type Restaurant.Domain.Aggregates.CategoryAggregate.Category in the database that satisfy given System.Linq.Expressions.Expression.

public Task<IEnumerable<Category>> GetListAsync(Expression<Func<Category, bool>> expression)

Parameters

expression Expression < Func <Category, bool \>\>

Returns

Task < IEnumerable <Category\>\>

Last modified: 21 May 2024