소스 검색

Added ToObjects for enumerators of CoreRow

Kenric Nugteren 1 년 전
부모
커밋
cecbe21f1f
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  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>());
+        }
+    }
 }