Beispiel #1
0
 public UnitOfWork()
 {
     SqlConnect();
     Student            = new OrmEntitySet <StudentEntity>(_sqlConnection);
     Teacher            = new OrmEntitySet <TeacherEntity>(_sqlConnection);
     Subject            = new OrmEntitySet <SubjectEntity>(_sqlConnection);
     LessonPlan         = new OrmEntitySet <LessonPlanEntity>(_sqlConnection);
     StudentsLessonPlan = new OrmEntitySet <StudentsLessonEntity>(_sqlConnection);
     InitializeAppRepositories();
 }
Beispiel #2
0
        static void Main()
        {
            //
            var sqlConnection = new SqlConnection(
                "Data Source=localhost\\SQLEXPRESS;Integrated Security=True;Initial Catalog=school_database"
                );

            sqlConnection.Open();
            OrmEntitySet <StudentsLessonEntity> subjectsSet = new OrmEntitySet <StudentsLessonEntity>(sqlConnection);

            subjectsSet.Where(x => x.Id == 5).Delete();
        }
Beispiel #3
0
 public SubjectRepository(OrmEntitySet <SubjectEntity> context) : base(context)
 {
 }
Beispiel #4
0
 protected GenericRepository(OrmEntitySet <T> context)
 {
     Context = context;
 }
Beispiel #5
0
 public StudentsLessonRepository(OrmEntitySet <StudentsLessonEntity> context) : base(context)
 {
 }
Beispiel #6
0
 public StudentsRepository(OrmEntitySet <StudentEntity> context) : base(context)
 {
 }
 public TeachersRepository(OrmEntitySet <TeacherEntity> context) : base(context)
 {
 }
 public LessonPlanRepository(OrmEntitySet <LessonPlanEntity> context) : base(context)
 {
 }