public async Task <IActionResult> Create(SchedulingDataModel request) { await _schedulingService.Create(request); if (ValidOperation() is false) { request.Dentists = await _dentistService.GetAll(); return(PartialView("_CreateScheduling", request)); } var url = Url.Action("Index", "Scheduling"); return(Json(new { success = true, url, messageText = "Agendamento Cadastrado com Sucesso!" })); }