public async Task <IActionResult> AddOrEditLawyerTiming(LawyerTiming lawyerTiming) { if (ModelState.IsValid) { if (lawyerTiming.LawyerTimingId != 0) { await _lawyerService.EditLawyerTiming(lawyerTiming); return(RedirectToAction("EditLawyer", "Lawyer", new { @id = lawyerTiming.LawyerId })); } else { await _lawyerService.AddLawyerTiming(lawyerTiming); return(RedirectToAction("EditLawyer", "Lawyer", new { @id = lawyerTiming.LawyerId })); } } return(View()); }