Example #1
0
 public void Update(TEntity inputEntity)
 {
     if (_appStoreDBContext.Set <TEntity>().Local.Any <TEntity>(e => e == inputEntity))
     {
         _dbSet.Update(inputEntity);
     }
     else
     {
         throw new KeyNotFoundException("The entity you tried to update does not exist");
         throw new Exception();
     }
 }
Example #2
0
 public GenericRepository(PlayStoreDBContext appStoreDBContext)
 {
     _appStoreDBContext = appStoreDBContext;
     _dbSet             = appStoreDBContext.Set <TEntity>();
 }