Beispiel #1
0
 public EfCoreModelBuilderArgs(ModelBuilder builder, Type contextType, IDbProviderInfoProps storeProviderInfo)
 {
     builder.EnsureNotNull(nameof(builder));
     contextType
     .EnsureNotNull(nameof(contextType))
     .EnsureCompatible(type: typeof(DbContext));
     storeProviderInfo =
         storeProviderInfo
         .EnsureNotNull(nameof(storeProviderInfo))
         .AsReadOnly()
         .EnsureValid()
         .Value;
     //
     _builder           = builder;
     _contextType       = contextType;
     _storeProviderInfo = storeProviderInfo;
 }
Beispiel #2
0
 public static bool IsPgsqlProvider(this IDbProviderInfoProps provider)
 {
     provider.EnsureNotNull(nameof(provider));
     //
     return(provider.ProviderInvariantName.EqualsOrdinalCS(otherString: PgsqlClientProviderName.InvariantName));
 }
Beispiel #3
0
 public DbProviderInfoProps(IDbProviderInfoProps other, bool isReadOnly = default)
     : this(providerInvarianName : other.EnsureNotNull(nameof(other)).Value.ProviderInvariantName, providerManifestToken : other.ProviderManifestToken, defaultSchemaName : other.DefaultSchemaName, isReadOnly : isReadOnly)
 {
 }