A: 

You can also try this, I think it's a little cleaner.

var orderLine = db.OrderLines.Single( ol => ol.ID == orderLineID ); 
var order = orderLine.GetOrder(); 

I beileive in your non-working example you want to use .First() instead of .Single().

Jerod Houghtelling
please see my edit with the actual code that doesn't work (commented out). thanks!
Rodney Burton
What is the return types from `msg.GetMessageTos` and `db.MessageTos`? Also what type is `msg` and `db`? Does this work: `var tos = db.MessagesTos.Where( mt => mt.Active `
Jerod Houghtelling
Are you doing this in a loop? If so, how is msgID set? You may be running into a access closure problem.
Jerod Houghtelling
testtos has the type IEnumerable<MessagesTo>, whereas tos has type type IQueryable<MessagesTo>.... msg is of type Message (a linq to sql class), and db is a subclass of System.Data.Linq.DataContext. I do believe var tos = db.MessagesTos.Where(mt => mt.Active would work. It only seems to be when accessing an association when the original query was done using a lambda exp.
Rodney Burton
No, it is not called from inside a loop. msgID is set as such from another function:db.Messages.InsertOnSubmit(msg);db.SubmitChanges();msgID = msg.ID;
Rodney Burton
A: 

It seems to me that the problem has more to do with the association than lambda expressions.

In your scenario, this should work:

var tos = db.MessagesTos.Where(mt=> mt.Active && mt.MessageID);

while this won't:

var tos = from mt in msg.SentTS
          where mt.Active
          select mt;

As to why it doesn't work, I suggest taking a look at the association in the designer and checking its matching the db model correctly (matching the correct columns). I also suggest to confirm that msg.SentTS is effectively coming empty, regardless of any further query you run on it.

eglasius
Yes, it does match the db model correctly. I also moved some of the code to a test page and it works correctly, including the lambda query. So I think it might have something to do with the datacontext caching the object graph or something weird to do with the use of TransactionScope. Right now, I'm going to just leave it alone... It works. Thanks for your input.
Rodney Burton