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); }
public Task<int> SendUserAMessage(User user, string message) { return emailService.SendEmail(user.Email, message).ContinueWith(_ => 0); }