bring menus and active submenus C#

Asked

Viewed 90 times

4

I have to make a query through the menu I have to bring only the active submenus, see my code.

return context.Set<Menu>().Include("MenuGroups")
              .Where(x => x.Id == id && x.MenuGroups.Any(z => z.Active))
              .FirstOrDefault();

my return continues bringing my submenus with the status false

1 answer

4


Browser other questions tagged

You are not signed in. Login or sign up in order to post.