public bool Save(IConfiguration configToSave)
        {
            Console.WriteLine(" ---- > Enter to Save method");
            _context.Set <T>();
            Console.WriteLine(" ---- > Set entity....");

            _context.Add(configToSave);
            Console.WriteLine(" ---- > Add to context");

            _context.SaveChanges();

            Console.WriteLine("Save to Database....");
            return(true);
        }
예제 #2
0
 public virtual Task <List <TEntity> > GetAll()
 {
     return(_context.Set <TEntity>().ToListAsync());
 }
 protected AbstractIndependentRepository(DatabaseDbContext dbContext)
 {
     DbContext = dbContext;
     DDbset    = DbContext.Set <TEntity>();
 }