Procházet zdrojové kódy

Added ToObjects for enumerators of CoreRow

Kenric Nugteren před 1 rokem
rodič
revize
cecbe21f1f
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9 0
      InABox.Core/CoreTable/CoreRow.cs

+ 9 - 0
InABox.Core/CoreTable/CoreRow.cs

@@ -257,4 +257,13 @@ namespace InABox.Core
         }
 
     }
+
+    public static class CoreRowExtensions
+    {
+        public static IEnumerable<T> ToObjects<T>(this IEnumerable<CoreRow> rows)
+            where T : BaseObject, new()
+        {
+            return rows.Select(x => x.ToObject<T>());
+        }
+    }
 }