I have one table for my online highscore called "HighScore". This table contains following columns:
Id, int (auto value) Name, string (player name) Guid, string (player id) Score, int (score) Coins, int (player's coins) Created, datetime (create date)
What I need is the top 50 scores but grouped by the Guid. I found a LINQ expression which works almost. How do I get the MAX row with a GROUP BY in LINQ query?
In the end I need a list of my HighScore objects. With the expression above, I get a anonymous kind of list.
Edit: Actually the name of my table is "CatGameScore" but I changed it in this post.
Content of the table (guids and dates are just illustrated)
Id Name Guid Score Coins Created
1 Hugo 123-123 150 10 <date>
2 Peter 456-456 600 19 <date>
3 Hugo 123-123 550 26 <date>
My output should be like this:
Id Name Guid Score Coins Created
2 Peter 456-456 600 19 <date>
3 Hugo 123-123 550 26 <date>
The output must be a List. I am able to get the top 50 scores per person, but I can't create a list of my score objects.
Thanks for any hints.
Andy