View Single Post
  #1 (permalink)  
Old June 3rd, 2011, 02:17 PM
chroniclemaster1 chroniclemaster1 is offline
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default 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.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
Reply With Quote