/// <summary>
 ///     Adds or updates a <see cref="CheckConstraintsOptionsExtension"/>
 ///     object with all kinds of check constraints enabled
 ///     to the current <see cref="DbContextOptionsBuilder"/> object.
 /// </summary>
 /// <param name="optionsBuilder">
 ///     <see cref="DbContextOptionsBuilder"/> object having <see cref="CheckConstraintsOptionsExtension"/>
 ///     added or updated with all kinds of check constraints enabled.
 /// </param>
 /// <param name="validationCheckConstraintsOptionsAction">
 ///     Configures validation check constraint creation.
 /// </param>
 /// <returns>
 ///     The current <see cref="DbContextOptionsBuilder"/> object.
 /// </returns>
 public static DbContextOptionsBuilder UseAllCheckConstraints(
     [NotNull] this DbContextOptionsBuilder optionsBuilder,
     [CanBeNull] Action <ValidationCheckConstraintOptionsBuilder> validationCheckConstraintsOptionsAction = null)
 => optionsBuilder
 .UseEnumCheckConstraints()
 .UseDiscriminatorCheckConstraints()
 .UseValidationCheckConstraints(validationCheckConstraintsOptionsAction);
Example #2
0
 public static DbContextOptionsBuilder UseAllCheckConstraints(
     [NotNull] this DbContextOptionsBuilder optionsBuilder, CultureInfo culture = null)
 => optionsBuilder.UseEnumCheckConstraints();