This is a migrated thread and some comments may be shown as answers.

Context has no members

2 Answers 40 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tayonee
Top achievements
Rank 1
Tayonee asked on 10 Aug 2011, 11:54 PM
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 Answers, 1 is accepted

Sort by
0
Nikola
Telerik team
answered on 11 Aug 2011, 05:10 PM
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,
Nikola
the Telerik team

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

0
Tayonee
Top achievements
Rank 1
answered on 11 Aug 2011, 05:16 PM
OMG. Late night. Chalk this one up to the "ID10T" user error. I put the code in class, sans method. Wow. (sheepishly) - case closed.
Tags
Getting Started
Asked by
Tayonee
Top achievements
Rank 1
Answers by
Nikola
Telerik team
Tayonee
Top achievements
Rank 1
Share this question
or