Context has no members

Thread is closed for posting
3 posts, 0 answers
  1. Tayonee
    Tayonee avatar
    52 posts
    Member since:
    Nov 2006

    Posted 10 Aug 2011 Link to this post

    I created a pretty simple ORM model. I have tried to create a context (to execute a stored procedure in the model) and when I try to get the members from the context it doesn't do ANYTHING. Nothing comes up.

    If I click on the design surface of the .rlinq file I see that the Name of the model is "SOREOTimeAndBillingModel". The Namespace is "SOREOOpenAccessModels". I have a test.vb file in the same project, where I insert this code on page load:

    "Dim context As New SOREOOpenAccessModels.SOREOTimeAndBillingModel" when I go to the next line I type "context." and nothing happens. What am I missing here? I have created other models just fine - I have rebuilt the project more than a few times, and have even recreated the .rlinq file from scratch once with no ability to get to any of the class objects or methods in the model. What gives???
  2. Nikola
    Nikola avatar
    27 posts

    Posted 11 Aug 2011 Link to this post

    Hello Mike,

    Well, this might be a shot in the dark but, are you sure you are trying to use the "context." variable inside of a method body? There is absolutely no reason for VS not to be able to find the properties and method declarations of a given class otherwise.

    If this is not the case, I will need some more information on this one.
    Can you please check if OpenAccess has successfully generated the correct OpenAccess Context class and method definitions for the stored procedure. You can do that if you expand the .rlinq file and look into the .vb file with the same name. If you don't see the arrow that should expand the .rlinq file, try selecting the "Show All Files" option in the Solution Explorer. It's in the toolbar on top of the Solution Explorer.

    Do not hesitate to contact us if you have any further troubles.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. Tayonee
    Tayonee avatar
    52 posts
    Member since:
    Nov 2006

    Posted 11 Aug 2011 Link to this post

    OMG. Late night. Chalk this one up to the "ID10T" user error. I put the code in class, sans method. Wow. (sheepishly) - case closed.
Back to Top