Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }