Commits

Mike Podonyi  committed 1e20a6c

Change to Casting because Assumption that when you ask for Entitys which have a special Baseclass/Interface so all requested Entities support this Baseclass/Interface

  • Participants
  • Parent commits b6c0422

Comments (0)

Files changed (1)

File src/Empi.Camino/Data/RepositoryBase.cs

 
         internal TEntity SingleOrDefault(Expression<Func<TEntity, bool>> exp, Type type)
         {
-            return GetTable(type).OfType<TEntity>().SingleOrDefault(exp); //MP: cast or oftype, not sure, test it
+            return GetTable(type).Cast<TEntity>().SingleOrDefault(exp); //MP: cast or oftype, not sure, test it
         }
 
         internal TEntity First(Expression<Func<TEntity, bool>> exp)