public async Task <IActionResult> Post(Client client, int serviceId) { if (!ModelState.IsValid) { return(new ObjectResult(client)); } await CreateClient(client, serviceId); string service = _repo.GetById <Service>(serviceId).Name; _emailSender.SendInstructions(service, client.Email, "Bla-bla"); _smsSender.SendSmsInstructions(service, client.PhoneNumber, "Bla-bla"); return(Json("Your information has been submitted!")); }