public void InvokeAll <TEntity>(ClassMapping <TEntity> classMap) where TEntity : class { if (classMap == null) { throw new ArgumentNullException(nameof(classMap)); } if (typeof(TEntity).IsAssignableFrom(typeof(T))) { throw new ArgumentException($"The generic of {classMap.GetType().FullName}<{typeof(TEntity).FullName}> must be assignable from {typeof(T).FullName}."); } InvokeAll(classMap); }