What exactly is an IQueryFluent and an IQueryObject ?

Apr 12, 2014 at 6:57 AM
This framework is working perfectly for me and I am now wondering how I could use some of the more advanced features that I am bit confused about. For example looking at the repository code I see the following:
public interface IQueryObject<TEntity>
        Expression<Func<TEntity, bool>> Query();
        Expression<Func<TEntity, bool>> And(Expression<Func<TEntity, bool>> query);
        Expression<Func<TEntity, bool>> Or(Expression<Func<TEntity, bool>> query);
        Expression<Func<TEntity, bool>> And(IQueryObject<TEntity> queryObject);
        Expression<Func<TEntity, bool>> Or(IQueryObject<TEntity> queryObject);
    public interface IQueryFluent<TEntity> where TEntity : IObjectState
        IQueryFluent<TEntity> OrderBy(Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> orderBy);
        IQueryFluent<TEntity> Include(Expression<Func<TEntity, object>> expression);
        IEnumerable<TEntity> SelectPage(int page, int pageSize, out int totalCount);
        IEnumerable<TResult> Select<TResult>(Expression<Func<TEntity, TResult>> selector = null);
        IEnumerable<TEntity> Select();
        Task<IEnumerable<TEntity>> SingleAsync();
        IQueryable<TEntity> SqlQuery(string query, params object[] parameters);
I cannot find much in the documentation that explains the background behind these. Can someone explain why and when they are used. For example what's the purpose of IQueryFluent and when would I benefit from using it. What does the IQueryObject do with the And and Or methods. I think it would be good if a little more information was added to the documentation to describe these.
Apr 16, 2014 at 6:50 PM
Marked as answer by lelong37 on 4/16/2014 at 10:50 AM