Hand off comparison logic for database query to implementors

Equals overrides are not used in EF queries without running the comaprison locally instead of on the database, so to preserve that the comparison logic is instead implemented on a per manager basis.
This commit is contained in:
naoey
2019-06-27 15:14:57 +05:30
parent 72bb6f8c12
commit 61260cf599
2 changed files with 11 additions and 1 deletions

View File

@ -145,6 +145,8 @@ namespace osu.Game.Beatmaps
void resetIds() => beatmapSet.Beatmaps.ForEach(b => b.OnlineBeatmapID = null);
}
protected override bool CheckLocalAvailability(BeatmapSetInfo model, IQueryable<BeatmapSetInfo> items) => items.Any(b => b.OnlineBeatmapSetID == model.OnlineBeatmapSetID);
/// <summary>
/// Delete a beatmap difficulty.
/// </summary>