コード例 #1
0
        /* To Delete multiple record at a time :)
         * <param name="predicate"> contains an expression like > where clause OR list */
        public virtual void DeleteWhere(IEnumerable <T> list)
        {
            _dbContext.Set <T>()
            .RemoveRange(list); // directly contain a list of record

            Save();             // save changes
        }
コード例 #2
0
 public BaseRepository(olxDbContext dbContext)
 {
     _dbContext = dbContext;
     _dbset     = _dbContext.Set <T>();
 }