Return `ILive` from `ToLive` calls instead of realm-typed instance

This commit is contained in:
Dean Herbert 2021-11-26 14:40:09 +09:00
parent bb6f8bd59c
commit 21e8ab8357
1 changed files with 3 additions and 3 deletions

View File

@ -49,13 +49,13 @@ public static T Detach<T>(this T item) where T : RealmObject
return mapper.Map<T>(item);
}
public static List<RealmLive<T>> ToLive<T>(this IEnumerable<T> realmList)
public static List<ILive<T>> ToLive<T>(this IEnumerable<T> realmList)
where T : RealmObject, IHasGuidPrimaryKey
{
return realmList.Select(l => new RealmLive<T>(l)).ToList();
return realmList.Select(l => new RealmLive<T>(l)).Cast<ILive<T>>().ToList();
}
public static RealmLive<T> ToLive<T>(this T realmObject)
public static ILive<T> ToLive<T>(this T realmObject)
where T : RealmObject, IHasGuidPrimaryKey
{
return new RealmLive<T>(realmObject);