1
Answer

Get record base on ID.

Photo of Guest User

Guest User

4y
397
1
I have use this code get record list base on id but face a issue 
string Categoryid = HttpContext.Request.Query["CatgeoryId"].SingleOrDefault();
var result = customEntityResult.Items.Select(x => (BlogPostDataModel)x.Model).Where(x => x.CategoryIds == Convert.ToInt32(Categoryid)).ToList());
 
Operator '==' cannot be applied to operands of type 'ICollection<int>' and 'int'--this issue face 

Answers (1)