public JsonResult GetMenuCfg() { JsonData json = new JsonData(); ServiceFactory sf = new ServiceFactory(); #region 此处需要使用工厂模式实现接口的实例化 ICrewDataService crew = new CrewDataService(GlobalCfg.DbConnectionString[GlobalCfg.DbCategory.ToString()]); #endregion 此处需要使用工厂模式实现接口的实例化 MenuDataManage menu = new MenuDataManage(crew); json = menu.QueryMenus(); return(Json(json, JsonRequestBehavior.AllowGet)); }
public IEnumerable <BaseCrew> Get() { IEnumerable <BaseCrew> crewList = CrewDataService.GetCrewData(); return(crewList); }
public CrewsController(IService <CrewDto> crewService, CrewDataService crewDataService) { _crewService = crewService; _crewDataService = crewDataService; }