p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 4 General Discussion (http://p2p.wrox.com/forumdisplay.php?f=561)
-   -   New error in working LINQ code (http://p2p.wrox.com/showthread.php?t=83877)

chroniclemaster1 June 3rd, 2011 02:17 PM

New error in working LINQ code
 
I switched laptops at work and had to recreate the test database for one of my projects. No problem. I dragged the DB table back over into my LINQ designer, but now when I run my code...

testcmsDataContext db = new testcmsDataContext();
IQueryable<cmschange> query = db.cmschanges;

I'm getting a bizarre error.

CS0029: Cannot implicitly convert type 'System.Data.Linq.Table<LINQDAL.CmsChanges.cmschan ge>' to 'System.Linq.IQueryable<cmschange>'

I've tried working around this, but without success, and not only was this code (and two others apps) working beautifully before, Table<TEntity> implements IQueryable<TEntity>. There shouldn't be a problem here.

Several blogs and forums pointed out import problems but I'm using System.Linq, System.Data.Linq, and System.Linq.Dynamic.


All times are GMT -4. The time now is 05:38 PM.

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