using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ReZero.SuperAPI { public partial class MethodApi { public List GetDbTypeSelectDataSource() { List enumItemInfos = new List(); var dts = UtilMethods.EnumToDictionary(); foreach (var item in dts) { enumItemInfos.Add(new EnumItemInfo() { Name = item.Key, Value = Convert.ToInt32(item.Value) + "" }); } return enumItemInfos.Take(7).ToList(); } public List GetNativeTypeSelectDataSource() { List enumItemInfos = new List(); var dts = UtilMethods.EnumToDictionary(); foreach (var item in dts) { enumItemInfos.Add(new EnumItemInfo() { Name = item.Key, Value = Convert.ToInt32(item.Value) + "" }); } return enumItemInfos.ToList(); } public static object GetWhereTypeList() { return SqlSugar.UtilMethods.EnumToDictionary() .Select(it => new { Key = it.Value.ToString(), Value = it.Value }).ToList(); } } }