public async Task InsertAsync(Position position) { var entity = new PositionEntity(GetPartitionKey(position.Exchange), GetRowKey(position.AssetId)); Mapper.Map(position, entity); await _storage.InsertAsync(entity); }
public async Task <Position> GetByAssetIdAsync(string assetId, string exchange) { PositionEntity entity = await _storage.GetDataAsync(GetPartitionKey(exchange), GetRowKey(assetId)); return(Mapper.Map <Position>(entity)); }