p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ADO.NET 3.5 with LINQ and the Entity Framework ISBN: 978-0-470-22988-0 (http://p2p.wrox.com/forumdisplay.php?f=482)
-   -   Creating a DataContext (http://p2p.wrox.com/showthread.php?t=73881)

Schildb April 13th, 2009 09:13 AM

Creating a DataContext
 
This might be the wrong place to ask this, but I'll give it a try. If this is the wrong place, could you please point me to a more correct forum?

I'm creating a VB.NET2008 LINQ Demo project. I added a copy of Northwind.sdf and renamed it as Demo.sdf and it contains just a few records from the Employees table. I used the SQL Metal OSUI to create the Demo.dbml and added it to the project. In the form code I want to add a DataContext something like:

Private DC as new DemoDataContext

But intellisense doesn't show any thing with DataContext in it.

Thanks,

Schildb April 14th, 2009 02:11 PM

Quote:

Originally Posted by Schildb (Post 239335)
This might be the wrong place to ask this, but I'll give it a try. If this is the wrong place, could you please point me to a more correct forum?

I'm creating a VB.NET2008 LINQ Demo project. I added a copy of Northwind.sdf and renamed it as Demo.sdf and it contains just a few records from the Employees table. I used the SQL Metal OSUI to create the Demo.dbml and added it to the project. In the form code I want to add a DataContext something like:

Private DC as new DemoDataContext

But intellisense doesn't show any thing with DataContext in it.

Thanks,

I see what I problem was. I was getting the correct DataContext, but could not get the my code based on the examples on pages 32 and 33 to work. I saw the corrections on this forum and when I made them all worked well.

Sorry for the post!


All times are GMT -4. The time now is 11:28 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.