1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

FirstOrDefault -> SingleOrDefault

This commit is contained in:
Dean Herbert 2017-10-25 22:17:17 +09:00
parent a5fb700229
commit c1d133977e

View File

@ -34,7 +34,7 @@ namespace osu.Game.Database
if (context.Entry(obj).State != EntityState.Detached) return;
var id = obj.ID;
obj = lookupSource?.FirstOrDefault(t => t.ID == id) ?? context.Find<T>(id);
obj = lookupSource?.SingleOrDefault(t => t.ID == id) ?? context.Find<T>(id);
}
/// <summary>