示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        public async Task <IActionResult> UpdateBeacon(UpdateBeaconDTO input)
        {
            try
            {
                await _beaconService.UpdateBeacon(input);

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