Owneat Technical Guide main Help

Class ProductRepository

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

public sealed class ProductRepository : Repository<Product, RestaurantContext>, IProductRepository, IRepository<Product>

Inheritance

object ← Repository<Product, RestaurantContext\> ← ProductRepository

Implements

IProductRepository, IRepository<Product\>

Inherited Members

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

Constructors

ProductRepository\(RestaurantContext\)

public ProductRepository(RestaurantContext context)

Parameters

context RestaurantContext

Methods

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

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

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

Parameters

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

Returns

Task <Product?\>

Remarks

This method includes related entities.

GetByExternalPaymentId\(string\)

Method that get an entity of type Restaurant.Domain.Aggregates.ProductAggregate.Product by its external payment id.

public Task<Product?> GetByExternalPaymentId(string externalPaymentId)

Parameters

externalPaymentId string

Returns

Task <Product?\>

GetByGuidListAsync\(IEnumerable<Guid\>\)

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

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

Parameters

productIds IEnumerable < Guid \>

Returns

Task < IEnumerable <Product\>\>

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

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

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

Parameters

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

Returns

Task < IEnumerable <Product\>\>

VerifyOrderIntegrity\(List<ProductBaseVerificationData\>\)

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

public Task<IEnumerable<Product>> VerifyOrderIntegrity(List<ProductBaseVerificationData> productsData)

Parameters

productsData List <ProductBaseVerificationData\>

Returns

Task < IEnumerable <Product\>\>

Last modified: 21 May 2024