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(); }
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(); }
public SubjectRepository(OrmEntitySet <SubjectEntity> context) : base(context) { }
protected GenericRepository(OrmEntitySet <T> context) { Context = context; }
public StudentsLessonRepository(OrmEntitySet <StudentsLessonEntity> context) : base(context) { }
public StudentsRepository(OrmEntitySet <StudentEntity> context) : base(context) { }
public TeachersRepository(OrmEntitySet <TeacherEntity> context) : base(context) { }
public LessonPlanRepository(OrmEntitySet <LessonPlanEntity> context) : base(context) { }