예제 #1
0
        public async Task Add(Location location)
        {
            AssetEntity asset = await assetDataService.GetAssetByIMEI(location.Device.DeviceId);

            if (asset != null)
            {
                LocationEntity mapped =
                    mapper.Map <Location, AssetEntity, LocationEntity>(location, asset);

                await locationDataService.Add(mapped);
            }
        }
예제 #2
0
        public async Task Add(Location location)
        {
            Asset asset = await assetDataService.GetAssetByIMEI(location.Device.IMEI);

            if (asset != null)
            {
                DataAccess.Model.Location mapped =
                    mapper.Map <Location, Asset, DataAccess.Model.Location>(location, asset);

                await locationDataService.Add(mapped);
            }
        }