public IEnumerable <VmTaskFullInfo> GetTaskFullInfoByFilter(VmTaskFullInfo filterItem) { var viewTaskFullInfoRepository = UnitOfWork.GetRepository <ViewTaskFullInfoRepository>(); var viewFilterItem = new ViewTaskFullInfo { Name = filterItem.Name, Grades = filterItem.Grades, Judges = filterItem.Judges, Description = filterItem.Description, }; var viewtaskFullInfoList = viewTaskFullInfoRepository.Select(viewFilterItem, 0, int.MaxValue); var vmTaskFullInfoList = from taskFullInfo in viewtaskFullInfoList select new VmTaskFullInfo { Id = taskFullInfo.Id, Name = taskFullInfo.Name, Grades = taskFullInfo.Grades, Judges = taskFullInfo.Judges, Description = taskFullInfo.Description, ImageUrl = taskFullInfo.ImageUrl, }; return(vmTaskFullInfoList); }
public JsonResult GetTaskFullInfoByFilter(VmTaskFullInfo filterItem = null) { var blTask = new BLTask(); var judgeFullInfoList = blTask.GetTaskFullInfoByFilter(filterItem).ToList(); return(Json(judgeFullInfoList, JsonRequestBehavior.AllowGet)); }