Unanswered How to get ObjectSet from ObjectContext?

  • Friday, May 11, 2012 4:23 AM
     
     
    I building a generic UI to view any ObjectSet in an ObjectContext.. But how do I get a particular ObjectSet from an ObjectContext?? Surely I dont have to use reflection to find it?!

All Replies

  • Friday, May 11, 2012 5:08 AM
     
      Has Code

    Hi, 

    Do you mean how to create ObjectSet for a type from ObjectContext? you can use

    ObjectContext.CreateObjectSet<T>

    right? 

    http://msdn.microsoft.com/en-us/library/dd383062.aspx

    Does this answer your question?


    If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".

  • Wednesday, May 16, 2012 1:00 PM
    Moderator
     
     

    Hi Mark Mnl,

    Welcome to MSDN Forum.

    I'm not clear about the question. Could you please post some code here? How did you get the ObjectContext and how did you let the use to choose a particular one? This is, so I can help you more effectively.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us