public ActionResult AddDoctor(int specialityId, int doctorId) { Speciality speciality = Speciality.Find(specialityId); Doctor doctor = Doctor.Find(doctorId); speciality.AddDoctor(doctor); return(RedirectToAction("Show", new { id = specialityId })); }
public ActionResult AddDoctor(int specialityId, int doctorId) { Speciality speciality = Speciality.Find(specialityId); // Console.WriteLine(specialityId); Doctor doctor = Doctor.Find(doctorId); // Console.WriteLine(doctorId); speciality.AddDoctor(doctor); // Console.WriteLine("added doc"); return(RedirectToAction("Show", new { id = specialityId })); }