You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 empty returns tags, use similar wording to other repos)
Per-method tasks
Rename GetPlayersMissingRankAsync to GetAllMissingRankAsync
Refactor GetAsync(bool eagerLoad) to be an overload of RepositoryBase.GetAllAsync()
Edit GetAsync(string username) to not throw an exception
Edit GetOrCreateAsync(long osuId) to use GetAsync(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 to int limit
Use LINQ functions instead of SQL syntax
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 calling GetAsync(int id) and using the resulting entity)
The text was updated successfully, but these errors were encountered:
The
PlayerRepository
needs a bit of cleanup. Some methods need to be renamed, and the documentation on the interface should be polished.Tasks:
IPlayerRepository
(remove emptyreturns
tags, use similar wording to other repos)GetPlayersMissingRankAsync
toGetAllMissingRankAsync
GetAsync(bool eagerLoad)
to be an overload ofRepositoryBase.GetAllAsync()
GetAsync(string username)
to not throw an exceptionGetOrCreateAsync(long osuId)
to useGetAsync(osuId)
instead of checking for an existing entity firstGetAsync(long osuId, bool eagerLoad, int mode = 0, int offsetDays = -1)
GetTopRatingsAsync(int n, Ruleset ruleset)
int n
toint limit
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)The text was updated successfully, but these errors were encountered: