public ClassActivity Create(ClassActivity itemToCreate) { var classactivity = _context.ClassActivities.Add(itemToCreate); _context.Entry(classactivity.AcademicYear).State = EntityState.Modified; return(classactivity); }
public ContactInformation Create(ContactInformation itemToCreate) { var contactInformation = _context.ContactInformations.Add(itemToCreate); _context.Entry(contactInformation.People).State = EntityState.Modified; _context.SaveChanges(); return(contactInformation); }
public User Create(User itemToCreate) { var user = _context.Users.Add(itemToCreate); _context.Entry(user.Role).State = EntityState.Modified; _context.SaveChanges(); return(user); }
public AcademicYearDetail Create(AcademicYearDetail academicYearToCreate) { var academicYearDetails = _context.AcademicYearDetails.Add(academicYearToCreate); _context.Entry(academicYearToCreate.Course).State = EntityState.Modified; _context.Entry(academicYearToCreate.Teacher).State = EntityState.Modified; _context.SaveChanges(); return(academicYearDetails); }
public Enroll Create(Enroll itemToCreate) { var enroll = _context.Enrolls.Add(itemToCreate); _context.Entry(enroll.AcademicYear).State = EntityState.Modified; _context.Entry(enroll.Student).State = EntityState.Modified; _context.SaveChanges(); return(enroll); }
public AcademicYear Create(AcademicYear itemToCreate) { var academicYear = _context.AcademicYears.Add(itemToCreate); _context.Entry(academicYear.Grade).State = EntityState.Modified; _context.SaveChanges(); //CreateDefaultPensum(itemToCreate); return(academicYear); }
public Pensum Update(Pensum itemToUpdate, bool updateCourse = true, bool updateGrade = true) { if (updateCourse) { _context.Entry(itemToUpdate.Course).State = EntityState.Modified; } if (updateGrade) { _context.Entry(itemToUpdate.Grade).State = EntityState.Modified; } _context.SaveChanges(); return(itemToUpdate); }
public Enroll Update(Enroll itemToUpdate, bool academicYear, bool student) { if (academicYear) { _context.Entry(itemToUpdate.AcademicYear).State = EntityState.Modified; } if (student) { _context.Entry(itemToUpdate.Student).State = EntityState.Modified; } _context.SaveChanges(); return(itemToUpdate); }
public AcademicYear Create(AcademicYear itemToCreate) { var ayear = _context.AcademicYears.Add(itemToCreate); _context.Entry(ayear.Course).State = EntityState.Modified; _context.Entry(ayear.Grade).State = EntityState.Modified; _context.Entry(ayear.Teacher).State = EntityState.Modified; _context.SaveChanges(); return(ayear); }
public NotificationComment Update(NotificationComment itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
public Role Update(Role itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; SaveChanges(); return(itemToUpdate); }
public Tutor Update(Tutor itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
public NotificationComments Update(NotificationComments itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; return(itemToUpdate); }
internal void Detach(Benefactor benefactor) { _context.Entry(benefactor).State = EntityState.Detached; }
public Course Update(Course itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
public AppointmentDiary Update(AppointmentDiary itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; return(itemToUpdate); }
public EducationLevel Update(EducationLevel itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
internal void Detach(Parent parent) { _context.Entry(parent).State = EntityState.Detached; }
public Grade Update(Grade itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; return(itemToUpdate); }
public Student Update(Student itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
public AcademicYear Update(AcademicYear itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
public Pensum Update(Pensum itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
public PeopleWithUser Update(PeopleWithUser itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
public Privilege Update(Privilege itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; _context.SaveChanges(); return(itemToUpdate); }
public void Detach(People people) { _context.Entry(people).State = EntityState.Detached; }
public Data.Entities.NotificationType Update(Data.Entities.NotificationType itemToUpdate) { _context.Entry(itemToUpdate).State = EntityState.Modified; return(itemToUpdate); }