jfeltjfelt
asked on
C# Linq statement conversion to VB.NET
I have been converting some C# code to VB for use in a web project. I'm not familiar with LINQ, but translating this code has been an extremely educational experience. I apologize if the code snippet does not format correctly. I've been able to convert all of the code so far except for the following statement:
messagesByOtherUsername = (from m in messages
let otherUser = m.SenderUsername == username ? m.RecipientUsername : m.SenderUsername
group m by otherUser into mbu
select new JsMessagesByUsername { Username = mbu.Key, Messages = mbu.Select(m => new JsMessage { Id = m.MessageId, Sender = m.SenderUsername, Msg = m.MessageContents }).ToList() }).ToList();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Excellent, glad I was able to help. ;=)
ASKER
Open in new window