diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 635ca79b0..443581b8f 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -97,6 +97,23 @@ namespace SqlSugar result.QueryBuilder.LambdaExpressions.ParameterIndex = this.QueryBuilder.LambdaExpressions.ParameterIndex; return result; } + public ISugarQueryable FullJoin(ISugarQueryable joinQueryable, Expression> joinExpression) + { + this.Context.InitMappingInfo(); + var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); + result.SqlBuilder = this.SqlBuilder; + result.Context = this.Context; + var joinInfo = GetJoinInfo(joinExpression, JoinType.Full); + var sqlObject = joinQueryable.ToSql(); + string sql = sqlObject.Key; + this.QueryBuilder.LambdaExpressions.ParameterIndex += 100; + UtilMethods.RepairReplicationParameters(ref sql, sqlObject.Value.ToArray(), this.QueryBuilder.LambdaExpressions.ParameterIndex, ""); + joinInfo.TableName = "(" + sql + ")"; + this.QueryBuilder.Parameters.AddRange(sqlObject.Value); + result.QueryBuilder.JoinQueryInfos.Add(joinInfo); + result.QueryBuilder.LambdaExpressions.ParameterIndex = this.QueryBuilder.LambdaExpressions.ParameterIndex; + return result; + } public ISugarQueryable LeftJoin(Expression> joinExpression) { this.Context.InitMappingInfo(); diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider02-05.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider02-05.cs index c981d0583..aa2b6ea7f 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider02-05.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider02-05.cs @@ -66,6 +66,24 @@ namespace SqlSugar result.QueryBuilder.LambdaExpressions.ParameterIndex = this.QueryBuilder.LambdaExpressions.ParameterIndex; return result; } + + public ISugarQueryable FullJoin(ISugarQueryable joinQueryable, Expression> joinExpression) + { + this.Context.InitMappingInfo(); + var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); + result.SqlBuilder = this.SqlBuilder; + result.Context = this.Context; + var joinInfo = GetJoinInfo(joinExpression, JoinType.Full); + var sqlObject = joinQueryable.ToSql(); + string sql = sqlObject.Key; + this.QueryBuilder.LambdaExpressions.ParameterIndex += 100; + UtilMethods.RepairReplicationParameters(ref sql, sqlObject.Value.ToArray(), this.QueryBuilder.LambdaExpressions.ParameterIndex, ""); + joinInfo.TableName = "(" + sql + ")"; + this.QueryBuilder.Parameters.AddRange(sqlObject.Value); + result.QueryBuilder.JoinQueryInfos.Add(joinInfo); + result.QueryBuilder.LambdaExpressions.ParameterIndex = this.QueryBuilder.LambdaExpressions.ParameterIndex; + return result; + } public ISugarQueryable LeftJoin(Expression> joinExpression) { this.Context.InitMappingInfo(); @@ -553,6 +571,23 @@ namespace SqlSugar result.QueryBuilder.LambdaExpressions.ParameterIndex = this.QueryBuilder.LambdaExpressions.ParameterIndex; return result; } + public ISugarQueryable FullJoin(ISugarQueryable joinQueryable, Expression> joinExpression) + { + this.Context.InitMappingInfo(); + var result = InstanceFactory.GetQueryable(this.Context.CurrentConnectionConfig); + result.SqlBuilder = this.SqlBuilder; + result.Context = this.Context; + var joinInfo = GetJoinInfo(joinExpression, JoinType.Full); + var sqlObject = joinQueryable.ToSql(); + string sql = sqlObject.Key; + this.QueryBuilder.LambdaExpressions.ParameterIndex += 100; + UtilMethods.RepairReplicationParameters(ref sql, sqlObject.Value.ToArray(), this.QueryBuilder.LambdaExpressions.ParameterIndex, ""); + joinInfo.TableName = "(" + sql + ")"; + this.QueryBuilder.Parameters.AddRange(sqlObject.Value); + result.QueryBuilder.JoinQueryInfos.Add(joinInfo); + result.QueryBuilder.LambdaExpressions.ParameterIndex = this.QueryBuilder.LambdaExpressions.ParameterIndex; + return result; + } public ISugarQueryable LeftJoin(Expression> joinExpression) { this.Context.InitMappingInfo(); diff --git a/Src/Asp.NetCore2/SqlSugar/Entities/DeleteNavOptions.cs b/Src/Asp.NetCore2/SqlSugar/Entities/DeleteNavOptions.cs index 826091f62..dfc3a4464 100644 --- a/Src/Asp.NetCore2/SqlSugar/Entities/DeleteNavOptions.cs +++ b/Src/Asp.NetCore2/SqlSugar/Entities/DeleteNavOptions.cs @@ -24,7 +24,7 @@ namespace SqlSugar } public class UpdateNavRootOptions { - public string IgnoreColumns { get; set; } + public string[] IgnoreColumns { get; set; } public string[] UpdateColumns { get; set; } public bool IsInsertRoot { get; set; } public bool IsDiffLogEvent { get; set; } diff --git a/Src/Asp.NetCore2/SqlSugar/Interface/IQueryable.cs b/Src/Asp.NetCore2/SqlSugar/Interface/IQueryable.cs index 4368690d5..43d228b00 100644 --- a/Src/Asp.NetCore2/SqlSugar/Interface/IQueryable.cs +++ b/Src/Asp.NetCore2/SqlSugar/Interface/IQueryable.cs @@ -26,6 +26,7 @@ namespace SqlSugar ISugarQueryable LeftJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable InnerJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable RightJoin(ISugarQueryable joinQueryable, Expression> joinExpression); + ISugarQueryable FullJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable LeftJoin(Expression> joinExpression); ISugarQueryable FullJoin(Expression> joinExpression); ISugarQueryable InnerJoin(Expression> joinExpression); @@ -219,6 +220,7 @@ namespace SqlSugar ISugarQueryable LeftJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable InnerJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable RightJoin(ISugarQueryable joinQueryable, Expression> joinExpression); + ISugarQueryable FullJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable LeftJoin(Expression> joinExpression); ISugarQueryable FullJoin(Expression> joinExpression); ISugarQueryable InnerJoin(Expression> joinExpression); @@ -322,6 +324,7 @@ namespace SqlSugar ISugarQueryable LeftJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable InnerJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable RightJoin(ISugarQueryable joinQueryable, Expression> joinExpression); + ISugarQueryable FullJoin(ISugarQueryable joinQueryable, Expression> joinExpression); ISugarQueryable LeftJoin(Expression> joinExpression); ISugarQueryable FullJoin(Expression> joinExpression); ISugarQueryable InnerJoin(Expression> joinExpression);