views:

64

answers:

2

I'm a bit confused, I have worked with Linq To SQL and gather we can query anything in the dbml or entities e.g:

var query = from i in db.mytable
            select i;

But in the Entity Framework (which supposedly Microsoft are replacing Linq To SQL with) how can we do the same thing? Is it even possible? How does it replace Linq To SQL?

Would be grateful of any examples of the Entity Framework - i.e how the above is done in the Entity Framework! Thanks.

+1  A: 

The same thing only you want to write

var query = from i in db.mytable
            select i;

i think you are not created the object(db) properly for Entity Framework

LINQ To SQL Vs. Entity Framework

anishmarokey
how does it know what database you are saving to then?
David
From your EDMX file
anishmarokey
+2  A: 
marc_s