Using:
-
.Net 4.0
-
EntityFramework 4.3
IF I query a DBSet in this manner:
public DbSet<Reciept> Reciepts { get; set; }
Reciepts.Where(rec =>rec.Number == reciept.Number &&
rec.Project.ID == reciept.Project.ID);
Will the entire table be returned, and THEN filterd by my query?
Or does it somehow translate this into SQL (Linq2SQL?), and return ONLY those rows?
It will only return filtered values.
You can always check the generated query by pointing a mouse cursor at a query variable while in debug:
Another great tool which can be used to check what is really being sent to the DB is SQL Server Profiler (http://msdn.microsoft.com/en-us/library/ms187929.aspx). I use it all the time while developing with EF.