Beispiel #1
0
        public async Task CreateBeacon(CreateBeaconDTO input)
        {
            var beacon = _mapper.Map <Beacon>(input);

            beacon.Artifact = await _artifactRepository.GetById(input.ArtifactId);

            await _beaconRepository.Create(beacon);
        }
Beispiel #2
0
        public async Task CreateBeacon(CreateBeaconDTO input)
        {
            var beacon = _mapper.Map <Beacon>(input);

            beacon.Location = await _locationRepository.GetById(input.LocationId);

            await _beaconRepository.Create(beacon);
        }
Beispiel #3
0
        public async Task <IActionResult> CreateBeacon(CreateBeaconDTO input)
        {
            try
            {
                await _beaconService.CreateBeacon(input);

                return(Ok());
            }
            catch (Exception e)
            {
                throw e;
            }
        }