public ActionResult SearchCriteria([FromBody] DictionarySearchCriteriaRequest request) { var listSearchCriteriaContracts = DeserializeJsonSearchCriteria(request.Json); AddCategoryCriteria(listSearchCriteriaContracts, request.SelectedBookIds, request.SelectedCategoryIds); var result = SearchHeadwordByCriteria(listSearchCriteriaContracts, request.Start, request.Count); return(Json(result)); }
public ActionResult SearchCriteria([FromBody] DictionarySearchCriteriaRequest request) { var listSearchCriteriaContracts = DeserializeJsonSearchCriteria(request.Json); listSearchCriteriaContracts.Add(CreateResultCriteriaContract(request.Start, request.Count)); if (!IsNullOrEmpty(request.SelectedBookIds) || !IsNullOrEmpty(request.SelectedCategoryIds)) { listSearchCriteriaContracts.Add(CreateCategoryCriteriaContract(request.SelectedBookIds, request.SelectedCategoryIds)); } using (var client = GetMainServiceClient()) { var result = client.SearchHeadwordByCriteria(listSearchCriteriaContracts, DictionarySearchTarget.Fulltext); return(Json(result)); } }