This question is locked. New answers and comments are not allowed.
I have a view that pulls data from a pair of tables. Table 1 is a list of messages for a user, table 2 is the user table itself.
When I open the view in MySQL, I see my two test messages in the system. One indicates unread, the other read (as desired).
However, when the list is queried through my application, it pulls one message twice and the other does not show. I have been racking my brain to find it, but am at a loss. Below is the relevant code.
//Get all messages for this user in this game //tUser is an object indicating the currently logged-in user |
var tmessages = (from m in sc.Extent<Vusermessage>() |
where m.ReceiverId == tUser.UserId && m.GameId == GameID |
select m).ToList(); |
//Split the result into saved and unsaved |
var umessages = (from m in tmessages |
where !m.IsSaved |
select m |
).ToList(); |
var smessages = (from s in tmessages |
where s.IsSaved |
select s |
).ToList(); |
gridSavedMessages.DataSource = smessages; |
gridSavedMessages.DataBind(); |
gridMessages.DataSource = umessages; |
gridMessages.DataBind(); |
The code is straightforward, I think. And. as I said, when i open the view in MySQL< I see both messages. The result of tmessages, however, is to return one message twice.
Ideas?
Sean