public async Task <IActionResult> GetComputer(int id) { var computer = await _repo.GetComputer(id); //var computersReturn = _mapper.Map<IEnumerable<ComputerForShowDto>>(computer); return(Ok(computer)); }
public async Task <bool> UpdateInventory(Computer computer) { var computerFromRepo = await _repo.GetComputer(computer.Id); computerFromRepo.Inventory = new string("1-" + computerFromRepo.Id); return(await _repo.SaveAll()); }