Ejemplo n.º 1
0
 public Task<Message> StoreMessageAsync(Message message)
 {
     return _factory.ExecuteAsync<IMessageRepository, long>(
         messageRepository => messageRepository.InsertAsync(message.ToEntity())
     ).ContinueWith(task =>
     {
         message.Id = task.Result;
         return message;
     }, TaskContinuationOptions.OnlyOnRanToCompletion);
 }