public override void Validate() { if (ConstructorParameters != null && ConstructorParameters.Count > 10) { throw new NotSupportedException("Too many parameters added. Maximum 10 constructor parameters"); } if (ConstructorParameters.Any(x => x == null)) { throw new NotSupportedException("Constructor parameters cannot be null"); } if (Type == null) { throw new NullReferenceException("No Type defined"); } }
public override void Validate() { if (ConstructorParameters != null && ConstructorParameters.Count > 10) { throw new NotSupportedException("Too many parameters added. Maximum 10 constructor parameters"); } if (ConstructorParameters.Any(x => x == null)) { throw new NotSupportedException("Constructor parameters cannot be null"); } if (Type == null) { throw new NullReferenceException("No Type defined"); } if (Cache.IsEnabled() && Lazy != LazyLoading.Disabled) { throw new NotSupportedException("Both Cache and IsLazy cannot be true. Cached models cannot lazy load."); } }