/// Edit application /// <param name="application"></param> public void EditApplication(Application application) { Application _application = (from app in _context.Application where app.ApplicationId == application.ApplicationId select app).FirstOrDefault(); if (_application == null) { throw new ApplicationException("Application doesnot exist"); } application.University = _universityDAO.GetUniversity(application.UniversityId); application.Applicant = _applicantDAO.GetApplicant(application.ApplicantId); _application.CourseName = application.CourseName.Trim(); _application.PersonalStatement = application.PersonalStatement.Trim(); _application.Firm = application.Firm; _application.TeacherContactDetails = application.TeacherContactDetails.Trim(); _application.TeacherReference = application.TeacherReference.Trim(); _application.UniversityOffer = application.UniversityOffer.Trim(); _application.ApplicantId = application.ApplicantId; _application.UniversityId = application.UniversityId; _context.SaveChanges(); }
public Applicant GetApplicant(int id) { return(applicantDao.GetApplicant(id)); }
public Applicant GetApplicant(int id) { return(_applicantDAO.GetApplicant(id)); }