mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
FirstOrDefault -> SingleOrDefault
This commit is contained in:
parent
a5fb700229
commit
c1d133977e
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user