Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. Using LINQ to query MULTI LEVEL object hierarchy [modified]

Using LINQ to query MULTI LEVEL object hierarchy [modified]

Scheduled Pinned Locked Moved LINQ
csharpdatabaselinqalgorithmshelp
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vipul Mehta
    wrote on last edited by
    #1

    Hi, I have an MULTI LEVEL hierarchical collection object - List<MyApplication> apps = new List<MyApplication>(); The MyApplication object contains following properties - int ApplicationId, List<MyApplication> MyApplications, string AppName and so on.. When my application starts, the apps "multi level" collection object gets filled up. Now on a particular action on an page, I need to get/search for an Application object that has ApplicationId = 308 (in real time this number would come dynamically). This is easily possible by looping through the collection object and comparing the ApplicationId property with variable holding value 308. But I wanted to know if this is possible using LINQ query to get an "MyApplication" object with ApplicationId as 308? I tried searching on this issue but came across examples with fixed hierarchy level. Your suggestion/pointers to this issue would be highly appreciated Note: 1. The level of the object hierarchy is not fixed and can vary. 2. ApplicationId would be UNIQUE for all MyApplication object(s) in the hierarchy.

    Regards, Vipul Mehta

    modified on Sunday, November 1, 2009 10:49 PM

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups