BaseRepository for EF6 - updated Previous question: BaseRepository for EF6

I've update my code.  Is it correct now?  I've changed IEnumerable to IQueryable.

public interface IRepository&lt;T&gt; : IDisposable
{
    T Get(Expression&lt;Func&lt;T, bool&gt;&gt; predicate);
    IQueryable&lt;T&gt; GetWhere(Expression&lt;Func&lt;T, bool&gt;&gt; predicate = null);
    void Add(T entity);
    void Delete(T entity);
    void DeleteWhere(Expression&lt;Func&lt;T, bool&gt;&gt; predicate);
    void Update(T entity);
    void Save();
}

public class BaseRepository&lt;T&gt; : IRepository&lt;T&gt; where T : class
{
    private readonly DbContext _dbContext;

    public BaseRepository(DbContext dbContext)
    {
        _dbContext = dbContext;
    }

    public T Get(Expression&lt;Func&lt;T, bool&gt;&gt; predicate)
    {
        return GetWhere(predicate).FirstOrDefault();
    }

    public IQueryable&lt;T&gt; GetWhere(Expression&lt;Func&lt;T, bool&gt;&gt; predicate = null)
    {
        IQueryable&lt;T&gt; result = _dbContext.Set&lt;T&gt;();
        return (predicate == null) ? result : Queryable.Where&lt;T&gt;(result, predicate);
    }

    public void Add(T entity)
    {
        _dbContext.Entry(entity).State = EntityState.Added;
    }

    public void Delete(T entity)
    {
        _dbContext.Entry(entity).State = EntityState.Deleted;
    }

    public void DeleteWhere(Expression&lt;Func&lt;T, bool&gt;&gt; predicate)
    {
        IQueryable&lt;T&gt; entities = GetWhere(predicate);
        foreach (T entity in entities)
            Delete(entity);
    }

    public void Update(T entity)
    {
        _dbContext.Entry(entity).State = EntityState.Modified;
    }

    public void Save()
    {
        _dbContext.SaveChanges();
    }

    public async void SaveAsync()
    {
        await _dbContext.SaveChangesAsync();
    }

    public void Dispose()
    {
        if (_dbContext != null)
            _dbContext.Dispose();
    }
}
DISCLAIMER I don't believe in wrapping EF with a repository. Entity Framework is a unit-of-work and repository implementation.





  I've changed IEnumerable to IQueryable.


You've just destroyed the usefulness of your repository, and leaked Linq-to-Entities to your clients: it doesn't matter what predicate you give GetWhere, the client code can now just say GetWhere().Where(x =&gt; whatever);, and the client code now controls when (execution is deferred until the result is iterated) and how the query will run on the database server... and that defeats the purpose of a repository.

What you had before was much more robust.

One of the answerers of your other question said In general, use IQueryable over IEnumerable in your repository. - that did not mean to expose IQueryable.