Пример #1
0
        private Repo()
        {
            context = new QLGiaSucContext();

            loaiGiaSucRepo  = new GenericRepository <LoaiGiaSuc>(context);
            danRepo         = new GenericRepository <Dan>(context);
            benhRepo        = new GenericRepository <Benh>(context);
            chamSocRepo     = new GenericRepository <ChamSoc>(context);
            chuongRepo      = new GenericRepository <Chuong>(context);
            xuatChuongRepo  = new GenericRepository <XuatChuong>(context);
            khoThuocRepo    = new GenericRepository <KhoThuoc>(context);
            loaiThuocRepo   = new GenericRepository <LoaiThuoc>(context);
            nhanVienRepo    = new GenericRepository <NhanVien>(context);
            theoDoiBenhRepo = new GenericRepository <TheoDoiBenh>(context);
            tiemChungRepo   = new GenericRepository <TiemChung>(context);
            congViecRepo    = new GenericRepository <CongViec>(context);
            khuVucRepo      = new GenericRepository <KhuVuc>(context);
        }
Пример #2
0
 public GenericRepository(QLGiaSucContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }