public async Task UpdateBeacon(UpdateBeaconDTO input) { var beacon = _mapper.Map <Beacon>(input); if (Guid.Empty != input.ArtifactId) { beacon.Artifact = await _artifactRepository.GetById(input.ArtifactId); } await _beaconRepository.Update(input.Id, beacon); }
public async Task UpdateBeacon(UpdateBeaconDTO input) { var beacon = _mapper.Map <Beacon>(input); if (Guid.Empty != input.LocationId) { beacon.Location = await _locationRepository.GetById(input.LocationId); } await _beaconRepository.Update(input.Id, beacon); }
public async Task <IActionResult> UpdateBeacon(UpdateBeaconDTO input) { try { await _beaconService.UpdateBeacon(input); return(Ok()); } catch (Exception) { throw; } }