Refactored WarehouseProduct

This commit is contained in:
Cristiano
2025-11-20 16:09:04 +01:00
parent 165c9b9322
commit 669938d677
6 changed files with 43 additions and 8 deletions

View File

@@ -59,9 +59,9 @@ public class PyrofetesRepository<T>(DbContext databaseContext, AutoMapper.IMappe
/// <param name="selector"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public async Task<decimal> SumAsync(
public async Task<int> SumAsync(
ISpecification<T> specification,
Expression<Func<T, decimal>> selector,
Expression<Func<T, int>> selector,
CancellationToken cancellationToken = default)
{
return await ApplySpecification(specification).SumAsync(selector, cancellationToken);

View File

@@ -0,0 +1,5 @@
using PyroFetes.Models;
namespace PyroFetes.Repositories;
public class WarehouseProductsRepository(PyroFetesDbContext pyrofetesContext, AutoMapper.IMapper mapper) : PyrofetesRepository<WarehouseProduct>(pyrofetesContext, mapper);