QueryOver.Of 查询方式 离线查询 联合查询

//maindocid
 var query = QueryOver.Of().Where(p => p.DocType == (int)doctype).JoinQueryOver((doc) => doc.Creator).Where(p => p.Id == curLoginUserID).Select(p => p.Id);
 return this.GetList(args, Subqueries.WhereProperty(p => p.Id).In(query), true);

table

  public partial class Maindoc 
    {
        public virtual int Id { get; set; }
        public virtual int DocType { get; set; }
        public virtual Users Creator { get; set; }
    }

你可能感兴趣的:(QueryOver)