Allow detach to be run against an IQueryable directly

This commit is contained in:
Dean Herbert 2021-01-12 17:01:16 +09:00
parent f0a9688baa
commit 46a1d99c74
1 changed files with 2 additions and 2 deletions

View File

@ -41,12 +41,12 @@ public static class RealmExtensions
}).CreateMapper();
/// <summary>
/// Create a detached copy of the each item in the list.
/// Create a detached copy of the each item in the collection.
/// </summary>
/// <param name="items">A list of managed <see cref="RealmObject"/>s to detach.</param>
/// <typeparam name="T">The type of object.</typeparam>
/// <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>();