public virtual TEntity Update(int id, TEntity entity) { MemoryCache.ClearCacheGroup(groupCacheKey); entity.Id = id; Collection.Update(entity); return(entity); }
public virtual void Remove(int id) { MemoryCache.ClearCacheGroup(groupCacheKey); Collection.Delete(new BsonValue(id)); }
public virtual Int64 AddBulk(IEnumerable <TEntity> entity) { MemoryCache.ClearCacheGroup(groupCacheKey); return(Collection.Insert(entity)); }
public virtual void Remove(TEntity entity) { MemoryCache.ClearCacheGroup(groupCacheKey); Remove(entity.Id); }
public virtual TEntity Add(TEntity entity) { MemoryCache.ClearCacheGroup(groupCacheKey); Collection.Insert(entity); return(entity); }