Asp.net – how to optimize the queries that have where condition on subitem
currently i`m using very bad query to get the data i whant var map = await mapRepository.SingleAsync(x => x.Slug == slug); var groups = await repository.Queryable() .Include(x => x.Categories.Where(c => c.Locations.Any(l => l.MapId == map.Id))) // if not exist gets…