mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-17 17:41:28 +08:00
Synchronization code
This commit is contained in:
@@ -65,6 +65,7 @@ namespace SqlSugar
|
||||
{
|
||||
ignoreColumns = new string[] { };
|
||||
}
|
||||
this.Context = UpdateNavProvider._Context;
|
||||
var navColumns = this.Context.EntityMaintenance.GetEntityInfo<Root>().Columns.Where(it=> !ignoreColumns.Contains(it.PropertyName) || !ignoreColumns.Any(z=>z.EqualCase(it.DbColumnName))).Where(it => it.Navigat != null).ToList();
|
||||
var updateNavs = this;
|
||||
UpdateNavMethodInfo methodInfo = updateNavs.IncludeByNameString(navColumns[0].PropertyName);
|
||||
|
||||
@@ -753,6 +753,13 @@ namespace SqlSugar
|
||||
model.Args[0].MemberName = name;
|
||||
return AggregateSum(model);
|
||||
}
|
||||
public virtual string AggregateAvgNoNull(MethodCallExpressionModel model)
|
||||
{
|
||||
model.Args.Add(new MethodCallExpressionArgs() { MemberValue = 0, MemberName = 0 });
|
||||
var name = IsNull(model);
|
||||
model.Args[0].MemberName = name;
|
||||
return AggregateAvg(model);
|
||||
}
|
||||
public virtual string JsonListObjectAny(MethodCallExpressionModel model)
|
||||
{
|
||||
throw new NotImplementedException("Current database no support");
|
||||
|
||||
@@ -105,6 +105,7 @@ namespace SqlSugar
|
||||
string JsonLike(MethodCallExpressionModel model);
|
||||
string Collate(MethodCallExpressionModel model);
|
||||
string AggregateSumNoNull(MethodCallExpressionModel model);
|
||||
string AggregateAvgNoNull(MethodCallExpressionModel model);
|
||||
string JsonListObjectAny(MethodCallExpressionModel model);
|
||||
string JsonArrayAny(MethodCallExpressionModel model);
|
||||
string CompareTo(MethodCallExpressionModel model);
|
||||
|
||||
@@ -318,6 +318,7 @@ namespace SqlSugar
|
||||
public static TResult AggregateSumNoNull<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static string Collate(string thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static TResult AggregateAvg<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static TResult AggregateAvgNoNull<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static TResult AggregateMin<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static TResult AggregateMax<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
public static int AggregateCount<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
|
||||
|
||||
Reference in New Issue
Block a user