We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public IQueryable<T1, T2, T3> Join<E1, E2>(Expression<Func<E1, E2, bool>> expression, JoinType join = JoinType.Inner) where E1 : class where E2 : class { var onExpression = ExpressionUtil.BuildExpression(expression, _param, _prefix, false); var table1Name = EntityUtil.GetTable<E1>().TableName; var table2Name = EntityUtil.GetTable<E2>().TableName; var joinType = string.Format("{0} JOIN", join.ToString().ToUpper()); if (_tables.Count == 0) { _tables.Add(table1Name); _tables.Add(table2Name); Join(string.Format("{0} {1} {2} ON {3}", table1Name, joinType, table2Name, onExpression)); } else if (_tables.Exists(a => table1Name == a)) { _tables.Add(table2Name); Join(string.Format("{0} {1} ON {2}", joinType, table2Name, onExpression)); } else { _tables.Add(table1Name); Join(string.Format("{0} {1} ON {2}", joinType, table1Name, onExpression)); } return this; }
T1, T2, T3 三个实体 ,为什么表达式只有E1, E2两个参数,不应该有个E3吗?不然E3的表关联关系怎么表达呢?
The text was updated successfully, but these errors were encountered:
通过Join两次就能解决
Sorry, something went wrong.
No branches or pull requests
T1, T2, T3 三个实体 ,为什么表达式只有E1, E2两个参数,不应该有个E3吗?不然E3的表关联关系怎么表达呢?
The text was updated successfully, but these errors were encountered: