public IActionResult EditInstructor(int id, Instructor ins) { Instructor OldIns = _db.GetInstructorById(id); if (OldIns == null) { return(NotFound($"Instructor Not Found you id is {id}")); } if (OldIns.InstId != ins.InstId) { return(BadRequest($"OldID is{OldIns.InstId}:NEWID is {OldIns.InstId}")); } else { Instructor EditedIns = _db.EditInstructor(OldIns, ins); return(Ok(EditedIns)); } }