Exemplo n.º 1
0
        public override async Task <ProductSold> FindAsync(params object[] id)
        {
            var res = ProductSoldMapper.MapFromDAL(await Uow.ProductsSold.FindAsync(id));

            res.Sale = SaleMapper.MapFromDAL(await Uow.Sales.FindAsync(res.SaleId));
            return(res);
        }
Exemplo n.º 2
0
        public override async Task <List <ProductSold> > AllAsync()
        {
            var res = (await Uow.ProductsSold.AllAsync()).Select(e => ProductSoldMapper.MapFromDAL(e)).ToList();

            foreach (var result in res)
            {
                result.Sale = SaleMapper.MapFromDAL(await Uow.Sales.FindAsync(result.SaleId));
            }

            return(res);
        }
Exemplo n.º 3
0
 public async Task <List <DTO.ProductSold> > AllAsyncByShopAndSaleId(int id, int?shopId)
 {
     return((await Uow.ProductsSold.AllAsyncByShopAndSaleId(id, shopId))
            .Select(e => ProductSoldMapper.MapFromDAL(e)).ToList());
 }
Exemplo n.º 4
0
 public async Task <DTO.ProductSold> GetAsyncByShopAndIdDTO(int id, int?shopId)
 {
     return(ProductSoldMapper.MapFromDAL(await Uow.ProductsSold.GetAsyncByShopAndIdDTO(id, shopId)));
 }
Exemplo n.º 5
0
 public async Task <List <ProductSold> > FindBySaleId(int saleId)
 {
     return((await Uow.ProductsSold.FindBySaleId(saleId)).Select(e => ProductSoldMapper.MapFromDAL(e)).ToList());
 }