❔ EF Core LINQ - Many to Many Search with && and ||
Hi there,
I have a 3 table structure for file storage that I would like to search, consisting of the following:
I would like to search files by assigned labels. I want to provide AND and OR groups for this search, so a search by
I have struggled for a while to work out an efficient way to do this. I will always have the IDs of the labels I want to search by as provided in the example, those are looked up beforehand.
I'd like to formulate this into a fast, efficient linq query(s)
I have a 3 table structure for file storage that I would like to search, consisting of the following:
I would like to search files by assigned labels. I want to provide AND and OR groups for this search, so a search by
LabelEntity.Id might look like so:(1 || 2) && (5 || 7 || 12) && 17 && (4 || 6)I have struggled for a while to work out an efficient way to do this. I will always have the IDs of the labels I want to search by as provided in the example, those are looked up beforehand.
I'd like to formulate this into a fast, efficient linq query(s)