Revert "Return back DatabaseBackedStore's query and populate functions"

This reverts commit 7cf5d63cd3.
This commit is contained in:
Dean Herbert
2017-10-16 12:56:58 +09:00
parent 04e5f764a3
commit 8a0b184dd6
10 changed files with 80 additions and 120 deletions

View File

@ -6,13 +6,12 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Newtonsoft.Json;
using osu.Game.Database;
using osu.Game.IO.Serialization;
using osu.Game.Rulesets;
namespace osu.Game.Beatmaps
{
public class BeatmapInfo : IEquatable<BeatmapInfo>, IJsonSerializable, IPopulate
public class BeatmapInfo : IEquatable<BeatmapInfo>, IJsonSerializable
{
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ID { get; set; }
@ -125,11 +124,5 @@ namespace osu.Game.Beatmaps
public bool BackgroundEquals(BeatmapInfo other) => other != null && BeatmapSet != null && other.BeatmapSet != null &&
BeatmapSet.Hash == other.BeatmapSet.Hash &&
(Metadata ?? BeatmapSet.Metadata).BackgroundFile == (other.Metadata ?? other.BeatmapSet.Metadata).BackgroundFile;
public void Populate(OsuDbContext connection)
{
var entry = connection.Entry(this);
entry.Reference<BeatmapDifficulty>(nameof(Difficulty));
}
}
}