Пример #1
0
 protected Repository(ControleFinanceiroContext db)
 {
     Db        = db;
     DbSet     = db.Set <TEntity>();
     EntitySet = DbSet.AsQueryable <TEntity>();
 }
 protected ReadOnlyRepository(ControleFinanceiroContext context, IHttpContextAccessor httpContextAccessor = null) : base(httpContextAccessor)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }
Пример #3
0
 public void Add(TEntity obj)
 {
     Db.Set <TEntity>().Add(obj);
     Db.SaveChanges();
 }
 public Repository(ControleFinanceiroContext context)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }