public tblstudenteducationalbackground GetEducLevelUpdate(int levelId) { tblstudenteducationalbackground studentEducationLevel = (from p in svmContext.tblstudenteducationalbackground where p.IsDeleted == false && p.LevelId == levelId select p).FirstOrDefault(); return(studentEducationLevel); }
public void UpdateEducationalBackground(int educId, int levelId, string schoolName, string schoolYear, string awardsReceived) { tblstudenteducationalbackground tblStudentEducationalBackground = GetEducLevelUpdate(educId); tblStudentEducationalBackground.LevelId = tblStudentEducationalBackground.LevelId; tblStudentEducationalBackground.SchoolName = schoolName; tblStudentEducationalBackground.SchoolYear = schoolYear; tblStudentEducationalBackground.AwardsReceived = awardsReceived; svmContext.tblstudenteducationalbackground.Add(tblStudentEducationalBackground); svmContext.SaveChanges(); //svmContext.tblstuden.Add(tblStudentEducationalBackground); }
public void SaveEducationalBackground(int levelId, string schoolName, string schoolYear, string awardsReceived, int studentId) { tblstudenteducationalbackground tblStudentEducationalBackground = new tblstudenteducationalbackground(); tblStudentEducationalBackground.EducLevelId = levelId; tblStudentEducationalBackground.SchoolName = schoolName; tblStudentEducationalBackground.SchoolYear = schoolYear; tblStudentEducationalBackground.AwardsReceived = awardsReceived; tblStudentEducationalBackground.StudentId = studentId; svmContext.tblstudenteducationalbackground.Add(tblStudentEducationalBackground); svmContext.SaveChanges(); //svmContext.tblstuden.Add(tblStudentEducationalBackground); }