public async Task EditQuantityinItems(EditItemDto dto) { var SortedItem = await GetListSortedWithPrice(dto.subcategoryId); for (int i = 0; i < SortedItem.Count; i++) { SortedItem[i].Qty = dto.qtysArr[i]; } }
public async Task EditItem(EditItemDto input) { var item = await _dbContext.Items.SingleOrDefaultAsync(i => i.Id == input.Id); if (item == null) { return; } item.Title = input.Title; item.Description = input.Description; await _dbContext.SaveChangesAsync(); }
public IActionResult EditQuantity(EditItemDto dto) { _unitOfWork.Items.EditQuantityinItems(dto); _unitOfWork.Complete(); return(Ok()); }