Esempio n. 1
0
        public ClassActivity Create(ClassActivity itemToCreate)
        {
            var classactivity = _context.ClassActivities.Add(itemToCreate);

            _context.Entry(classactivity.AcademicYear).State = EntityState.Modified;
            return(classactivity);
        }
Esempio n. 2
0
        public ContactInformation Create(ContactInformation itemToCreate)
        {
            var contactInformation = _context.ContactInformations.Add(itemToCreate);

            _context.Entry(contactInformation.People).State = EntityState.Modified;
            _context.SaveChanges();
            return(contactInformation);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        public AcademicYear Create(AcademicYear itemToCreate)
        {
            var academicYear = _context.AcademicYears.Add(itemToCreate);

            _context.Entry(academicYear.Grade).State = EntityState.Modified;
            _context.SaveChanges();
            //CreateDefaultPensum(itemToCreate);
            return(academicYear);
        }
Esempio n. 7
0
 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);
 }
Esempio n. 8
0
 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);
 }
Esempio n. 9
0
        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);
 }
Esempio n. 11
0
 public Role Update(Role itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     SaveChanges();
     return(itemToUpdate);
 }
Esempio n. 12
0
 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);
 }
Esempio n. 14
0
 internal void Detach(Benefactor benefactor)
 {
     _context.Entry(benefactor).State = EntityState.Detached;
 }
Esempio n. 15
0
 public Course Update(Course itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     _context.SaveChanges();
     return(itemToUpdate);
 }
Esempio n. 16
0
 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);
 }
Esempio n. 18
0
 internal void Detach(Parent parent)
 {
     _context.Entry(parent).State = EntityState.Detached;
 }
Esempio n. 19
0
 public Grade Update(Grade itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     return(itemToUpdate);
 }
Esempio n. 20
0
 public Student Update(Student itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     _context.SaveChanges();
     return(itemToUpdate);
 }
Esempio n. 21
0
 public AcademicYear Update(AcademicYear itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     _context.SaveChanges();
     return(itemToUpdate);
 }
Esempio n. 22
0
 public Pensum Update(Pensum itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     _context.SaveChanges();
     return(itemToUpdate);
 }
Esempio n. 23
0
 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);
 }
Esempio n. 25
0
 public void Detach(People people)
 {
     _context.Entry(people).State = EntityState.Detached;
 }
Esempio n. 26
0
 public Data.Entities.NotificationType Update(Data.Entities.NotificationType itemToUpdate)
 {
     _context.Entry(itemToUpdate).State = EntityState.Modified;
     return(itemToUpdate);
 }