Hi
I'm getting into LinqToSql and using the NerdDinner tutorial.
I'm trying to understand the syntax and would like to write out in more verbose fashion what is happening in the first line, which works.
Question: How can I write the first query something like the commented out code (which doesn't work).
public Dinner GetDinner(int id){
var result = db.Dinners.SingleOrDefault(d => d.DinnerID == id);
//var result = from d in db.Dinners.SingleOrDefault
// where d.DinnerID == id
// select d;
return (result);
}
Cheers
Dave