Ejemplo n.º 1
0
 public Task<int> SendUserAMessage(User user, string message)
 {
     //simulate sending a message for this example
     return Task<int>.Factory.StartNew(() =>
     {
         Thread.Sleep(1000);
         return 1;
     });
     //return emailService.SendEmail(user.Email, message).ContinueWith(_ => 0);
 }
 public ViewResult IndexCompleted(User user)
 {
     return View(user);
 }
Ejemplo n.º 3
0
 public Task<int> SendUserAMessage(User user, string message)
 {
     return emailService.SendEmail(user.Email, message).ContinueWith(_ => 0);
 }