public AcademicCourse Create(AcademicCourse itemToCreate) { var academicYearDetails = _context.AcademicYearCourses.Add(itemToCreate); _context.SaveChanges(); return(academicYearDetails); }
public Benefactor Create(Benefactor itemToCreate) { var benefactor = _context.Benefactors.Add(itemToCreate); _context.SaveChanges(); return(benefactor); }
public People Create(People itemToCreate) { var people = _context.Peoples.Add(itemToCreate); _context.SaveChanges(); return(people); }
public Role Create(Role itemToCreate) { var role = _context.Roles.Add(itemToCreate); _context.SaveChanges(); return(role); }
public Parent Create(Parent itemToCreate) { var parent = _context.Parents.Add(itemToCreate); _context.SaveChanges(); return(parent); }
public Grade Create(Grade itemToCreate) { var grade = _context.Grades.Add(itemToCreate); _context.SaveChanges(); return(grade); }
public PeopleWithUser Create(PeopleWithUser itemToCreate) { var peopleWithUser = _context.PeopleWithUsers.Add(itemToCreate); _context.SaveChanges(); return(peopleWithUser); }
public Teacher Create(Teacher itemToCreate) { var teacher = _context.Teachers.Add(itemToCreate); _context.SaveChanges(); return(teacher); }
public Pensum Create(Pensum itemToCreate) { var pensum = _context.Pensums.Add(itemToCreate); _context.SaveChanges(); return(pensum); }
public Enroll Create(Enroll itemToCreate) { var enroll = _context.Enrolls.Add(itemToCreate); _context.SaveChanges(); return(enroll); }
public Event Create(Event itemToCreate) { var @event = _context.Events.Add(itemToCreate); _context.SaveChanges(); return(@event); }
public Tutor Create(Tutor itemToCreate) { var tutor = _context.Tutors.Add(itemToCreate); _context.SaveChanges(); return(tutor); }
public Privilege Create(Privilege itemToCreate) { var privilege = _context.Privileges.Add(itemToCreate); _context.SaveChanges(); return(privilege); }
public Homework Create(Homework itemToCreate) { Homework homework = _context.Homeworks.Add(itemToCreate); _context.SaveChanges(); return(homework); }
public Student Create(Student itemToCreate) { var student = _context.Students.Add(itemToCreate); _context.SaveChanges(); return(student); }
public Slider Create(Slider itemToCreate) { var sliderPhoto = _context.SliderPhotos.Add(itemToCreate); _context.SaveChanges(); return(sliderPhoto); }
public Meister Create(Meister itemToCreate) { var meister = _context.Meisters.Add(itemToCreate); _context.SaveChanges(); return(meister); }
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); }
public AcademicYear Create(AcademicYear academicYearGradeToCreate) { var academicYear = _context.AcademicYears.Add(academicYearGradeToCreate); _context.SaveChanges(); return(academicYear); }
public Teacher Create(Teacher itemToCreate) { _context.Users.Attach(itemToCreate.MyUser); var teacher = _context.Teachers.Add(itemToCreate); _context.SaveChanges(); return(teacher); }
public Course Delete(long id) { var itemToDelete = GetById(id); _context.Courses.Remove(itemToDelete); _context.SaveChanges(); return(itemToDelete); }
public User Create(User itemToCreate) { var user = _context.Users.Add(itemToCreate); _context.Entry(user.Role).State = EntityState.Modified; _context.SaveChanges(); return(user); }
public User Create(User itemToCreate) { itemToCreate.EncryptPassword(); var user = _context.Users.Add(itemToCreate); _context.SaveChanges(); return(user); }
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); }
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 Parent Create(Parent itemToCreate) { itemToCreate.Disable = false; _context.Users.Attach(itemToCreate.MyUser); var parent = _context.Parents.Add(itemToCreate); _context.SaveChanges(); return(parent); }
public AcademicYear Create(AcademicYear itemToCreate) { var academicYear = _context.AcademicYears.Add(itemToCreate); _context.Entry(academicYear.Grade).State = EntityState.Modified; _context.SaveChanges(); //CreateDefaultPensum(itemToCreate); return(academicYear); }