public async Task <IActionResult> SendGreeting(GreetingCreateInputModel input) { if (!this.ModelState.IsValid) { return(this.View(input)); } await this.usersService.SendGreeting(input.SenderUser, input.ReceiverUser, input.Comment); return(this.RedirectToAction(nameof(Index))); }
public IActionResult SendGreeting(string senderUsername, string receiverUsername, string phoneNumber) { var viewModel = new GreetingCreateInputModel { SenderUser = senderUsername, ReceiverUser = receiverUsername, PhoneNumber = phoneNumber, }; return(this.View(viewModel)); }