You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
770 B
40 lines
770 B
using System.Linq.Expressions;
|
|
|
|
namespace SqlSugar
|
|
{
|
|
public class SubMax:ISubOperation
|
|
{
|
|
public string Name
|
|
{
|
|
get
|
|
{
|
|
return "Max";
|
|
}
|
|
}
|
|
|
|
public Expression Expression
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
|
|
public int Sort
|
|
{
|
|
get
|
|
{
|
|
return 200;
|
|
}
|
|
}
|
|
|
|
public ExpressionContext Context
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public string GetValue(Expression expression = null)
|
|
{
|
|
var exp = expression as MethodCallExpression;
|
|
return "MAX("+SubTools.GetMethodValue(this.Context, exp.Arguments[0], ResolveExpressType.FieldSingle)+")";
|
|
}
|
|
}
|
|
}
|