public ActionResultTO SaveStudent(string studentName, string studentSurname, string studentSex, int studentAge) { ActionResultTO result = new ActionResultTO(); result = StudentDetails.SaveStudent(studentName, studentSurname, studentSex, studentAge); return(result); }
public static ActionResultTO ToActionResultTo(this ActionResult result) { ActionResultTO actionResultTO = new ActionResultTO(); actionResultTO.Success = result.Success; actionResultTO.Message = result.Message; return(actionResultTO); }
public static ActionResultTO SaveStudent(string studentName, string studentSurname, string studentSex, int studentAge) { Student student = new Student(studentName, studentSurname, studentSex, studentAge); ActionResult result = new ActionResult(); result = student.SaveStudent(studentName, studentSurname, studentSex, studentAge); ActionResultTO resultTo = result.ToActionResultTo(); return(resultTo); }