常用方法
常用方法
常用方法
常用方法
public ActionResult Create([Bind(Include = "Id,InstructorName,InstructorContact")] Instructor instructor) { var validationResult = _instructorService.Validate(instructor); if (!validationResult.Item1) { throw new Exception(validationResult.Item2); } _instructorService.AddInstructor(instructor); return(RedirectToAction("Index")); }