//*************1.1 define***************
 //private ProductRepository _prodectRepo;
 //private ProjectRepository _projectRepo;
 //*************1.1***************
 public UnitOfWork(JooleEntities entity)
 {
     this._je = entity;
     Products = new ProductRepository(_je);
     Projects = new ProjectRepository(_je);
     //need modify the projectRepository, when we add any Repository, we just add here
 }
 public GenericRepository(JooleEntities context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }
Exemplo n.º 3
0
 public GenericRepository(JooleEntities dbcontext)
 {
     this._dbcontext = dbcontext;
     this.dbset      = _dbcontext.Set <TEntity>();
 }
Exemplo n.º 4
0
 public ProductRepository(JooleEntities context) : base(context)
 {
 }
        //***private DbSet<TEnity> _dbset;
        //private JooleEntities<TEnity> dbSet = new JooleEntities<TEnity>();

        public Repository(JooleEntities entity)
        {
            this._je = entity;
            //***_dbset = entity.Set<TEnity>();
        }
        //private JooleEntities _je;

        public ProductRepository(JooleEntities entity)
            : base(entity)
        {
            //this._je = entity;
        }
Exemplo n.º 7
0
 public ProductRepository(JooleEntities dbcontext) : base(dbcontext)
 {
     this._dbcontext = dbcontext;
     this.dbset      = _dbcontext.Set <Product>();
 }
 //optional constructor, itself will create the Entity**********<top and bottom>
 public UnitOfWork()
 {
     this._je = new JooleEntities();
     Products = new ProductRepository(_je);
     Projects = new ProjectRepository(_je);
 }
Exemplo n.º 9
0
 public UserRepository(JooleEntities dbcontext) : base(dbcontext)
 {
     this._dbcontext = dbcontext;
     this.dbset      = _dbcontext.Set <User>();
 }
Exemplo n.º 10
0
 public ProjectRepository(JooleEntities entity)
     : base(entity)
 {
 }
Exemplo n.º 11
0
 public UnitofWork(JooleEntities dbcontext)
 {
     this.dbcontext = dbcontext;
 }