Original SQL query would be :
- Code: Select all
SELECT * FROM dolcharacters ORDER BY `PlayedTime` LIMIT 1;
There is no WHERE clause in this request. But every SelectObjects<T>() start after the WHERE clause (so perhaps correct arg1 is "1 ORDER BY `PlayedTime` LIMIT 1").
2nd argument is blank because you don't need any parameter.
.FirstOrDefault() is the LIMIT 1 part. It is not needed, you can grab ALL objects and just use the myResult[0] to grab the result, or query all and use LINQ to order (but theses are a BAD design decision, there could be many many records - this is why i still suggest LIMIT x).