Closed
Description
The PlayerRepository
needs a bit of cleanup. Some methods need to be renamed, and the documentation on the interface should be polished.
Tasks:
- Organize methods so that all private members come after public ones
- Organize methods so that all overloads follow each other in order
- Clean up XML documentation of
IPlayerRepository
(remove emptyreturns
tags, use similar wording to other repos) - Per-method tasks
- Rename
GetPlayersMissingRankAsync
toGetAllMissingRankAsync
- Refactor
GetAsync(bool eagerLoad)
to be an overload ofRepositoryBase.GetAllAsync()
- Edit
GetAsync(string username)
to not throw an exception - Edit
GetOrCreateAsync(long osuId)
to useGetAsync(osuId)
instead of checking for an existing entity first - Remove unused method
GetAsync(long osuId, bool eagerLoad, int mode = 0, int offsetDays = -1)
- Refactor
GetTopRatingsAsync(int n, Ruleset ruleset)
- Parameter
int n
toint limit
- Use LINQ functions instead of SQL syntax
- Parameter
- Identify and correct usages of
Get{Property}Async
(Many places where these are used call multiple of them in succession, which creates an unnecessary amount of database calls. Most can be fixed by simply callingGetAsync(int id)
and using the resulting entity)
- Rename