Hello How to Implement Filtering in custom entities (For Blog Categories). I have try to Implement but not working .This is code
var Categoryid = Convert.ToInt32(HttpContext.Request.Cookies["CategoryId"]);
var webQuery = new SearchBlogPostsQuery();
webQuery.CategoryId = Categoryid;
//---------
var query = new SearchCustomEntityRenderSummariesQuery();
query.CustomEntityDefinitionCode = BlogPostCustomEntityDefinition.DefinitionCode;
query.PageNumber = webQuery.PageNumber;
query.PageSize = 5;
var pagedResult = await _domainRepository.ExecuteQueryAsync(query);
ICollection pagedItems = pagedResult.Items;
var state = await _visualEditorStateService.GetCurrentAsync();
query.PublishStatus = state.GetAmbientEntityPublishStatusQuery();
// TODO: Filtering by Category (webQuery.CategoryId)
// Searching/filtering custom entities is not implemented yet
var entities = await _customEntityRepository.SearchCustomEntityRenderSummariesAsync(query);
// Examples of various properties and methods on IPagedResult<TResult>
var viewModel = MapBlogPosts(entities);
return View(viewModel);
Hello How to Implement Filtering in custom entities (For Blog Categories). I have try to Implement but not working .This is code var Categoryid = Convert.ToInt32(HttpContext.Request.Cookies["CategoryId"]); var webQuery = new SearchBlogPostsQuery(); webQuery.CategoryId = Categoryid; pagedItems = pagedResult.Items;
var state = await _visualEditorStateService.GetCurrentAsync();
query.PublishStatus = state.GetAmbientEntityPublishStatusQuery();
//--------- var query = new SearchCustomEntityRenderSummariesQuery(); query.CustomEntityDefinitionCode = BlogPostCustomEntityDefinition.DefinitionCode;
query.PageNumber = webQuery.PageNumber; query.PageSize = 5; var pagedResult = await _domainRepository.ExecuteQueryAsync(query);
ICollection