Guest User

Guest User

  • Tech Writer
  • 43
  • 7k

Get record base on ID.

Apr 23 2021 7:31 AM
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)