Last post Oct 16, 2014 10:09 PM by Fei Han - MSFT
Oct 15, 2014 03:49 PM|davelewicki|LINK
The compiler is rejecting "spvi" - that's my schema. "not in current context". Can you help?
var q = from p in spvi.contracts
where p.contract_number = "SP030002DW643"
Oct 16, 2014 05:10 AM|Fei Han - MSFT|LINK
Thanks your post.
The compiler is rejecting "spvi" - that's my schema. "not in current context".
As for your problem, I recommend to check the namespace of your page file and spvi file, if they are not with same namespace, you should import spvi file namespace into code-behind in your page. The code look like:
Hope it will be helpful to you.
Oct 16, 2014 09:41 AM|davelewicki|LINK
Fei, thanks for your reply. What is SampleDemo? What is Model? Should one of them be spvi?
Oct 16, 2014 10:09 PM|Fei Han - MSFT|LINK
Fei Han - MSFT
I just set an example, the namespace of my schema is SampleDemo.Model, so I use the above sample code to import this namespace from code-behind.