mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:03:02 +08:00
Allow detach to be run against an IQueryable directly
This commit is contained in:
parent
f0a9688baa
commit
46a1d99c74
@ -41,12 +41,12 @@ namespace osu.Game.Database
|
|||||||
}).CreateMapper();
|
}).CreateMapper();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a detached copy of the each item in the list.
|
/// Create a detached copy of the each item in the collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="items">A list of managed <see cref="RealmObject"/>s to detach.</param>
|
/// <param name="items">A list of managed <see cref="RealmObject"/>s to detach.</param>
|
||||||
/// <typeparam name="T">The type of object.</typeparam>
|
/// <typeparam name="T">The type of object.</typeparam>
|
||||||
/// <returns>A list containing non-managed copies of provided items.</returns>
|
/// <returns>A list containing non-managed copies of provided items.</returns>
|
||||||
public static List<T> Detach<T>(this List<T> items) where T : RealmObject
|
public static List<T> Detach<T>(this IEnumerable<T> items) where T : RealmObject
|
||||||
{
|
{
|
||||||
var list = new List<T>();
|
var list = new List<T>();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user