public async Task UpdateFloor(UpdateFloorDTO input) { var floor = _mapper.Map <Floor>(input); if (Guid.Empty != input.BuildingId) { floor.Building = await _buildingRepository.GetById(input.BuildingId); } await _repository.Update(floor.Id, floor); }
public async Task <IActionResult> UpdateFloor(UpdateFloorDTO input) { try { await _floorService.UpdateFloor(input); return(Ok()); } catch (Exception) { throw; } }