2019-01-24 17:43:03 +09:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2018-11-28 16:47:10 +09:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
using osu.Framework.Platform;
|
|
|
|
|
using osu.Game.Database;
|
|
|
|
|
|
2018-11-28 16:12:57 +09:00
|
|
|
|
namespace osu.Game.Scoring
|
2018-04-13 18:19:50 +09:00
|
|
|
|
{
|
2019-03-01 10:25:21 +09:00
|
|
|
|
public class ScoreStore : MutableDatabaseBackedStoreWithFileIncludes<ScoreInfo, ScoreFileInfo>
|
2018-04-13 18:19:50 +09:00
|
|
|
|
{
|
2018-11-28 16:47:10 +09:00
|
|
|
|
public ScoreStore(IDatabaseContextFactory factory, Storage storage)
|
|
|
|
|
: base(factory, storage)
|
2018-04-13 18:19:50 +09:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-28 18:33:01 +09:00
|
|
|
|
protected override IQueryable<ScoreInfo> AddIncludesForConsumption(IQueryable<ScoreInfo> query)
|
2018-11-28 20:41:48 +09:00
|
|
|
|
=> base.AddIncludesForConsumption(query)
|
2021-10-04 17:35:53 +09:00
|
|
|
|
.Include(s => s.BeatmapInfo)
|
|
|
|
|
.Include(s => s.BeatmapInfo).ThenInclude(b => b.Metadata)
|
|
|
|
|
.Include(s => s.BeatmapInfo).ThenInclude(b => b.BeatmapSet).ThenInclude(s => s.Metadata)
|
2018-11-28 20:41:48 +09:00
|
|
|
|
.Include(s => s.Ruleset);
|
2018-04-13 18:19:50 +09:00
|
|
|
|
}
|
|
|
|
|
}
|