Ejemplo n.º 1
0
        public AcademicCourse Create(AcademicCourse itemToCreate)
        {
            var academicYearDetails = _context.AcademicYearCourses.Add(itemToCreate);

            _context.SaveChanges();
            return(academicYearDetails);
        }
Ejemplo n.º 2
0
        public Benefactor Create(Benefactor itemToCreate)
        {
            var benefactor = _context.Benefactors.Add(itemToCreate);

            _context.SaveChanges();
            return(benefactor);
        }
Ejemplo n.º 3
0
        public People Create(People itemToCreate)
        {
            var people = _context.Peoples.Add(itemToCreate);

            _context.SaveChanges();
            return(people);
        }
Ejemplo n.º 4
0
        public Role Create(Role itemToCreate)
        {
            var role = _context.Roles.Add(itemToCreate);

            _context.SaveChanges();
            return(role);
        }
Ejemplo n.º 5
0
        public Parent Create(Parent itemToCreate)
        {
            var parent = _context.Parents.Add(itemToCreate);

            _context.SaveChanges();
            return(parent);
        }
Ejemplo n.º 6
0
        public Grade Create(Grade itemToCreate)
        {
            var grade = _context.Grades.Add(itemToCreate);

            _context.SaveChanges();
            return(grade);
        }
Ejemplo n.º 7
0
        public PeopleWithUser Create(PeopleWithUser itemToCreate)
        {
            var peopleWithUser = _context.PeopleWithUsers.Add(itemToCreate);

            _context.SaveChanges();
            return(peopleWithUser);
        }
Ejemplo n.º 8
0
        public Teacher Create(Teacher itemToCreate)
        {
            var teacher = _context.Teachers.Add(itemToCreate);

            _context.SaveChanges();
            return(teacher);
        }
Ejemplo n.º 9
0
        public Pensum Create(Pensum itemToCreate)
        {
            var pensum = _context.Pensums.Add(itemToCreate);

            _context.SaveChanges();
            return(pensum);
        }
Ejemplo n.º 10
0
        public Enroll Create(Enroll itemToCreate)
        {
            var enroll = _context.Enrolls.Add(itemToCreate);

            _context.SaveChanges();
            return(enroll);
        }
Ejemplo n.º 11
0
        public Event Create(Event itemToCreate)
        {
            var @event = _context.Events.Add(itemToCreate);

            _context.SaveChanges();
            return(@event);
        }
Ejemplo n.º 12
0
        public Tutor Create(Tutor itemToCreate)
        {
            var tutor = _context.Tutors.Add(itemToCreate);

            _context.SaveChanges();
            return(tutor);
        }
Ejemplo n.º 13
0
        public Privilege Create(Privilege itemToCreate)
        {
            var privilege = _context.Privileges.Add(itemToCreate);

            _context.SaveChanges();
            return(privilege);
        }
Ejemplo n.º 14
0
        public Homework Create(Homework itemToCreate)
        {
            Homework homework = _context.Homeworks.Add(itemToCreate);

            _context.SaveChanges();
            return(homework);
        }
Ejemplo n.º 15
0
        public Student Create(Student itemToCreate)
        {
            var student = _context.Students.Add(itemToCreate);

            _context.SaveChanges();
            return(student);
        }
Ejemplo n.º 16
0
        public Slider Create(Slider itemToCreate)
        {
            var sliderPhoto = _context.SliderPhotos.Add(itemToCreate);

            _context.SaveChanges();
            return(sliderPhoto);
        }
Ejemplo n.º 17
0
        public Meister Create(Meister itemToCreate)
        {
            var meister = _context.Meisters.Add(itemToCreate);

            _context.SaveChanges();
            return(meister);
        }
Ejemplo n.º 18
0
    public Profile Create(Profile itemToCreate)
    {
        var profile = _context.Profiles.Add(itemToCreate);

        _context.SaveChanges();
        return(profile);
    }
        public Notification Create(Notification itemToCreate)
        {
            var notification = _context.Notifications.Add(itemToCreate);

            _context.SaveChanges();
            return(notification);
        }
        public EducationLevel Create(EducationLevel itemToCreate)
        {
            var role = _context.EducationLevels.Add(itemToCreate);

            _context.SaveChanges();
            return(role);
        }
Ejemplo n.º 21
0
        public AcademicYear Create(AcademicYear academicYearGradeToCreate)
        {
            var academicYear = _context.AcademicYears.Add(academicYearGradeToCreate);

            _context.SaveChanges();
            return(academicYear);
        }
Ejemplo n.º 22
0
        public Teacher Create(Teacher itemToCreate)
        {
            _context.Users.Attach(itemToCreate.MyUser);
            var teacher = _context.Teachers.Add(itemToCreate);

            _context.SaveChanges();
            return(teacher);
        }
Ejemplo n.º 23
0
        public Course Delete(long id)
        {
            var itemToDelete = GetById(id);

            _context.Courses.Remove(itemToDelete);
            _context.SaveChanges();
            return(itemToDelete);
        }
Ejemplo n.º 24
0
        public User Create(User itemToCreate)
        {
            var user = _context.Users.Add(itemToCreate);

            _context.Entry(user.Role).State = EntityState.Modified;
            _context.SaveChanges();
            return(user);
        }
Ejemplo n.º 25
0
        public User Create(User itemToCreate)
        {
            itemToCreate.EncryptPassword();
            var user = _context.Users.Add(itemToCreate);

            _context.SaveChanges();
            return(user);
        }
Ejemplo n.º 26
0
        public ContactInformation Create(ContactInformation itemToCreate)
        {
            var contactInformation = _context.ContactInformations.Add(itemToCreate);

            _context.Entry(contactInformation.People).State = EntityState.Modified;
            _context.SaveChanges();
            return(contactInformation);
        }
        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);
        }
Ejemplo n.º 28
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);
        }
Ejemplo n.º 29
0
        public Parent Create(Parent itemToCreate)
        {
            itemToCreate.Disable = false;
            _context.Users.Attach(itemToCreate.MyUser);
            var parent = _context.Parents.Add(itemToCreate);

            _context.SaveChanges();
            return(parent);
        }
Ejemplo n.º 30
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);
        }