1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-17 01:32:54 +08:00
osu-lazer/osu.Game/Scoring/ScoreStore.cs

26 lines
976 B
C#
Raw Normal View History

// 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 17:19:50 +08:00
using System.Linq;
using Microsoft.EntityFrameworkCore;
2018-04-13 17:19:50 +08:00
using osu.Framework.Platform;
using osu.Game.Database;
2018-11-28 15:12:57 +08:00
namespace osu.Game.Scoring
2018-04-13 17:19:50 +08:00
{
public class ScoreStore : MutableDatabaseBackedStoreWithFileIncludes<ScoreInfo, ScoreFileInfo>
2018-04-13 17:19:50 +08:00
{
public ScoreStore(IDatabaseContextFactory factory, Storage storage)
: base(factory, storage)
2018-04-13 17:19:50 +08:00
{
}
2018-11-28 17:33:01 +08:00
protected override IQueryable<ScoreInfo> AddIncludesForConsumption(IQueryable<ScoreInfo> query)
=> base.AddIncludesForConsumption(query)
.Include(s => s.BeatmapInfo)
.Include(s => s.BeatmapInfo).ThenInclude(b => b.Metadata)
.Include(s => s.BeatmapInfo).ThenInclude(b => b.BeatmapSet).ThenInclude(s => s.Metadata)
.Include(s => s.Ruleset);
2018-04-13 17:19:50 +08:00
}
}