2018-04-13 09:19:50 +00:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2018-11-28 07:47:10 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Framework.Platform;
|
|
|
|
|
using osu.Game.Database;
|
|
|
|
|
|
2018-11-28 07:12:57 +00:00
|
|
|
|
namespace osu.Game.Scoring
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2018-11-28 09:33:01 +00:00
|
|
|
|
public class ScoreStore : MutableDatabaseBackedStore<ScoreInfo>
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2018-11-28 07:47:10 +00:00
|
|
|
|
public ScoreStore(IDatabaseContextFactory factory, Storage storage)
|
|
|
|
|
: base(factory, storage)
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-28 09:33:01 +00:00
|
|
|
|
protected override IQueryable<ScoreInfo> AddIncludesForConsumption(IQueryable<ScoreInfo> query)
|
2018-11-28 11:41:48 +00:00
|
|
|
|
=> base.AddIncludesForConsumption(query)
|
|
|
|
|
.Include(s => s.Files).ThenInclude(f => f.FileInfo)
|
2018-11-30 07:11:09 +00:00
|
|
|
|
.Include(s => s.Beatmap)
|
2018-11-28 11:41:48 +00:00
|
|
|
|
.Include(s => s.Ruleset);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
}
|
|
|
|
|
}
|