Compatible with .NET CORE

This commit is contained in:
sunkaixuan
2017-07-01 13:05:26 +08:00
parent 963c7de85d
commit 91a4e02a05
4 changed files with 16 additions and 11 deletions

View File

@@ -70,10 +70,14 @@ namespace SqlSugar
return type.GetTypeInfo().IsValueType;
}
public static bool IsEntity(this Type type)
{
return type.GetTypeInfo().IsClass();
}
public static Type ReflectedType(this MethodInfo method)
{
return method.ReflectedType;
}
}
}

View File

@@ -265,7 +265,7 @@ namespace SqlSugar
private void CheckMethod(MethodCallExpression expression)
{
Check.Exception(expression.Method.ReflectedType.FullName != ExpressionConst.SqlFuncFullName,string.Format(ExpressionErrorMessage.MethodError, expression.Method.Name));
Check.Exception(expression.Method.ReflectedType().FullName != ExpressionConst.SqlFuncFullName,string.Format(ExpressionErrorMessage.MethodError, expression.Method.Name));
}
}
}