public ViewResult DictListManage() { var model = new LayerDictManageViewModel(); var mapper = new MapperConfiguration(cfg => cfg.CreateMap <DictionaryDTO, Dict>()).CreateMapper(); var orderlist = mapper.Map <IEnumerable <DictionaryDTO>, List <Dict> >(_service.GetListOfDictionaries()) .OrderBy(x => x.Schema_name) .ThenBy(x => x.Table_name); model.DictList = orderlist.ToList(); return(View(model)); }