public async Task <IActionResult> UpdateGrid(int id, GridEditDto dto) { var gridFromRepo = await _repo.GetGrid(id); _mapper.Map(dto, gridFromRepo); if (await _repo.SaveAll()) { return(NoContent()); } throw new Exception($"Updating grid {id} failed to save"); }