Пример #1
0
 public UnitOfWork(Zadatak2Context context)
 {
     db       = context;
     Studenti = new StudentRepository(db);
     Ispiti   = new IspitRepository(db);
     Predmeti = new PredmetRepository(db);
 }
Пример #2
0
        public static IEnumerable <Ispit> GetIspits(Zadatak2Context context)
        {
            List <Ispit> ispiti = new List <Ispit>
            {
                new Ispit()
                {
                    BI        = context.Students.Find(1).BI,
                    PredmetId = context.Predmets.Find(1).PredmetId,
                    Oena      = 7
                },
                new Ispit()
                {
                    BI        = context.Students.Find(2).BI,
                    PredmetId = context.Predmets.Find(2).PredmetId,
                    Oena      = 8
                },
                new Ispit()
                {
                    BI        = context.Students.Find(3).BI,
                    PredmetId = context.Predmets.Find(1).PredmetId,
                    Oena      = 6
                }
            };

            return(ispiti);
        }
 public StudentRepository(Zadatak2Context db)
     : base(db)
 {
 }
 public PredmetRepository(Zadatak2Context db)
     : base(db)
 {
 }
 public IspitRepository(Zadatak2Context db)
     : base(db)
 {
 }