public ApiResult<IEnumerable<EnumListOutPut>> GetEnumList() { var res = new ApiResult<IEnumerable<EnumListOutPut>>(); var domain = ProjectPathHelper.assemblies .Where(m => m.GetName().Name.EndsWith("Domain")) .FirstOrDefault(); var enums = domain.GetTypes().Where(m => m.GetTypeInfo().IsEnum).ToList(); var list = new List<EnumListOutPut>(); foreach (var enumType in enums) { var enumModel = new EnumListOutPut() { EnumName = enumType.Name, EnumFileds = Enum.GetValues(enumType).Cast<Enum>() .Where(m => !m.ToString().Equals("UnKnown")).Select(x => new EnumFiledOutPut { Desc = x.GetEnumDesc(), Lable = x.GetType().Name, Value = x }).ToList() }; list.Add(enumModel); } res.Data = list; return res; }