Example #1
0
 private static bool IsEntityCollection(ModelBindingContext bindingContext, Type type, ref Type elType)
 {
     return IsOf(type, typeof(ICollection<>), out elType)
         && !type.IsArray
         && (!type.IsInterface || bindingContext.Model != null)
         && elType.CanAssign(typeof(IEntity));
 }
Example #2
0
 private static bool IsEntityEnumerable(Type type, ref Type elType)
 {
     return IsOf(type, typeof(IEnumerable<>), out elType) && elType.CanAssign(typeof(IEntity));
 }