using SqlSugar; namespace JNPF.Extras.DatabaseAccessor.SqlSugar.Extensions; /// /// Newtonsoft.Json 序列化拓展. /// public static class JsonSqlExtFunc { /// /// /// public static List ExpMethods = new List { new SqlFuncExternal(){ UniqueMethodName = "ToObject", MethodValue = (expInfo, dbType, expContext) => { //var value = string.Empty; return null; } } }; /// /// /// /// /// /// /// public static T ToObject(string value) { //这里不能写任何实现代码,需要在上面的配置中实现 throw new NotSupportedException("Can only be used in expressions"); } }