private static MenuEntity TranslateMenuEntity(MenuInfo menuInfo) { MenuEntity menuEntity = new MenuEntity(); if (menuEntity != null) { menuEntity.MenuID = menuInfo.MenuID; menuEntity.MenuName = menuInfo.MenuName; menuEntity.PreFlag = menuInfo.PreFlag ?? ""; menuEntity.SufFlag = menuInfo.SufFlag ?? ""; menuEntity.Remark = menuInfo.Remark ?? ""; menuEntity.URL = menuInfo.URL; menuEntity.Status = menuInfo.Status; menuEntity.GroupCode = menuInfo.GroupCode; if (!string.IsNullOrEmpty(menuEntity.GroupCode)) { menuEntity.BaseData = BaseDataService.GetBaseDataByType(menuEntity.GroupCode).FirstOrDefault() ?? new BaseDataEntity(); } else { menuEntity.BaseData = new BaseDataEntity(); } } return(menuEntity); }