Owneat Technical Guide main Help

Class RestaurantRepository

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

public sealed class RestaurantRepository : Repository<Restaurant, RestaurantContext>, IRestaurantRepository, IRepository<Restaurant>

Inheritance

object ← Repository<Restaurant, RestaurantContext\> ← RestaurantRepository

Implements

IRestaurantRepository, IRepository<Restaurant\>

Inherited Members

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

Constructors

RestaurantRepository\(RestaurantContext\)

public RestaurantRepository(RestaurantContext context)

Parameters

context RestaurantContext

Methods

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

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

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

Parameters

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

Returns

Task <Restaurant?\>

Remarks

This method includes related entities.

GetWithActiveMenuAsync\(Expression<Func<Restaurant, bool\>\>\)

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

public Task<Restaurant?> GetWithActiveMenuAsync(Expression<Func<Restaurant, bool>> expression)

Parameters

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

Returns

Task <Restaurant?\>

Remarks

This method includes related entities and filter on menu active.

Last modified: 21 May 2024