public ViewResult create(int id) { GuarantorView guarantorView = new GuarantorView() { studentID = id //_studentRepo.GetStudent(id) }; return(View(guarantorView)); }
public ViewResult FullView(int id) { GuarantorView guarantorView = new GuarantorView() { guarantor = _guarantor.GetGuarantor(id), //pagetitle = "full view" }; return(View(guarantorView)); }
public IActionResult create(GuarantorView model) { if (ModelState.IsValid) { Guarantor guarantor1 = new Guarantor() { //ID = model.Id, FirstName = model.FirstName, LastName = model.LastName, Address = model.Address, Email = model.Email, Gender = model.Gender, Phone = model.Phone, _student_id = model.studentID, MaritalStatus = model.MaritalStatus, Nationality = model.Nationality }; _guarantor.AddGuarantor(guarantor1); return(RedirectToAction("create")); } return(View()); }