Exemplo n.º 1
0
        public async Task InsertAsync(Position position)
        {
            var entity = new PositionEntity(GetPartitionKey(position.Exchange), GetRowKey(position.AssetId));

            Mapper.Map(position, entity);

            await _storage.InsertAsync(entity);
        }
Exemplo n.º 2
0
        public async Task <Position> GetByAssetIdAsync(string assetId, string exchange)
        {
            PositionEntity entity = await _storage.GetDataAsync(GetPartitionKey(exchange), GetRowKey(assetId));

            return(Mapper.Map <Position>(entity));
        }