/// <summary> /// 初始化一个<see cref="ExamsSearch"/>对象实例 /// </summary> /// <param name="request"></param> public ExamsSearch(ExamsSearchRequest request) { if (request != null) { CourseId = request.CourseId; Keyword = request.Keyword; Type = request.Type; Status = request.Status; PageIndex = request.PageIndex; PageSize = request.PageSize; } }
public IActionResult Search(ExamsSearcherViewModel model) { ExamsSearchRequest request = new ExamsSearchRequest { CourseId = model.CourseId, Keyword = model.Keyword, PageIndex = model.PageIndex, PageSize = model.PageSize, Type = model.Type, Status = model.Status }; var result = service.Search(request); return(Ok(result)); }
/// <summary> /// 搜索考卷信息 /// </summary> /// <param name="request"></param> /// <returns></returns> public PagerModel <Data.Entity.Exams> Search(ExamsSearchRequest request) { var searcher = new ExamsSearch(request); return(searcher.Search()); }