public async Task <bool> UpdateMessageAsync(Message message) { var messageCosmos = new MessageCosmos { Id = message.Id.ToString(), Text = message.Text }; var response = await _cosmosStore.UpdateAsync(messageCosmos); return(response.IsSuccess); }
public async Task <bool> CreateMessageAsync(Message message) { var messageCosmos = new MessageCosmos { Id = Guid.NewGuid().ToString(), Text = message.Text }; var response = await _cosmosStore.AddAsync(messageCosmos); message.Id = Guid.Parse(messageCosmos.Id); return(response.IsSuccess); }