public async Task CreateBeacon(CreateBeaconDTO input) { var beacon = _mapper.Map <Beacon>(input); beacon.Artifact = await _artifactRepository.GetById(input.ArtifactId); await _beaconRepository.Create(beacon); }
public async Task CreateBeacon(CreateBeaconDTO input) { var beacon = _mapper.Map <Beacon>(input); beacon.Location = await _locationRepository.GetById(input.LocationId); await _beaconRepository.Create(beacon); }
public async Task <IActionResult> CreateBeacon(CreateBeaconDTO input) { try { await _beaconService.CreateBeacon(input); return(Ok()); } catch (Exception e) { throw e; } }