public async Task <bool> UpdateOrderAsync(Order orderToUpdate) { var cosmosOrder = new CosmosOrderDto { Id = orderToUpdate.Id.ToString(), Amount = orderToUpdate.Amount }; var response = await _cosmosStore.UpdateAsync(cosmosOrder); return(response.IsSuccess); }
public async Task <bool> CreateOrderAsync(Order order) { var cosmosOrder = new CosmosOrderDto { Id = Guid.NewGuid().ToString(), Amount = order.Amount }; var response = await _cosmosStore.AddAsync(cosmosOrder); order.Id = Guid.Parse(cosmosOrder.Id); return(response.IsSuccess); }