I have a DbSet that contains a list of Item, Now I want to search an Item from the database based on its nested list item matching.
Item Model
public int ItemID{ get; set; }
public string Cover { get; set; }
public List<SlideModel> Slides { get; set; }
Slide Model
public int SlideID{ get; set; }
public int ItemID{ get; set; }
public string Slide{ get; set; }
Now I will pass a search string of Slide and it will search for the Item who have the Slide in its List<SlideModel> and return the Item
item = await context.Items
.Include(i => i.Slides)
.Where(...todo-maybe...)
.FirstOrDefaultAsync();
How should I write the Query method to get the item based on the slide
SlideList.