Example #1
0
 public UnitOfWork(WorkFollowDataContext dbContext)
 {
     _dbContext        = dbContext;
     reportRepository  = new EfReportRepository(_dbContext);
     urgencyRepository = new EfUrgencyRepository(_dbContext);
     taskRepository    = new EfTaskRepository(_dbContext);
     userRepository    = new EfUserRepository(_dbContext);
 }
Example #2
0
 public void Update(T entity)
 {
     using (var context = new WorkFollowDataContext())
     {
         context.Entry <T>(entity).State = EntityState.Modified;
         context.SaveChanges();
     }
     //dbSet.Update(entity);
 }
 public EfReportRepository(WorkFollowDataContext dbContext) : base(dbContext)
 {
     _dbContext = dbContext;
 }
Example #4
0
 public EfRepository(WorkFollowDataContext dbContext)
 {
     _dbContext = dbContext;
     this.dbSet = _dbContext.Set <T>();
 }
Example #5
0
 public EfUrgencyRepository(WorkFollowDataContext dbContext) : base(dbContext)
 {
     _dbContext = dbContext;
 }