The first expression obtains the contact identifier using a different identifying value. The second expression gets the entire contact using the contact identifier. It seems to me that I can combine these two statements into one, but I struggle too much (tired, embarrassed, made stupid mistakes, etc.). These two statements work, and I get the result that I need, but I feel that it can be cleaner and, possibly, with one expression.
Thanks for the help!
var contactId = DAL.dc.ContactMrns.Where(cm => cm.MRN == recipient.MRN) .Select(x => x.ContactId) .First(); var contact = DAL.dc.Contacts.Where(c => c.ContactID == contactId).First();
source share