示例#1
0
        /// <summary>
        /// Adds or entirely replaces an asset conditions layer.
        /// </summary>
        /// <param name="layer">The asset conditon layer.</param>
        /// <returns></returns>
        public async Task InsertOrReplaceAsync(IAssetConditionLayer layer)
        {
            var entity = new AssetConditionLayerEntity(GetPartitionKey(), GetRowKey(layer.Id));

            Mapper.Map(layer, entity);

            await _storage.InsertOrReplaceAsync(entity);
        }
示例#2
0
        /// <summary>
        /// Returns asset conditions layer.
        /// </summary>
        /// <param name="layerId">The asset conditions layer id.</param>
        /// <returns>An asset conditions layer</returns>
        public async Task <IAssetConditionLayer> GetAsync(string layerId)
        {
            AssetConditionLayerEntity layer = await _storage.GetDataAsync(GetPartitionKey(), GetRowKey(layerId));

            var result = Mapper.Map <AssetConditionLayerDto>(layer);

            return(result);
        }