Updated to C# 12
This commit is contained in:
@@ -33,11 +33,15 @@ namespace Microsoft.EntityFrameworkCore
|
||||
/// <returns>The <see cref="DbContextOptionsBuilder"/> with applied settings.</returns>
|
||||
public static DbContextOptionsBuilder UseDatabaseProvider(this DbContextOptionsBuilder optionsBuilder, IConfiguration configuration, Action<DatabaseProviderOptions> optionsAction = null)
|
||||
{
|
||||
#if NET8_0_OR_GREATER
|
||||
ArgumentNullException.ThrowIfNull(optionsBuilder);
|
||||
ArgumentNullException.ThrowIfNull(configuration);
|
||||
#else
|
||||
if (optionsBuilder == null)
|
||||
throw new ArgumentNullException(nameof(optionsBuilder));
|
||||
|
||||
if (configuration == null)
|
||||
throw new ArgumentNullException(nameof(configuration));
|
||||
#endif
|
||||
|
||||
var options = new DatabaseProviderOptions();
|
||||
optionsAction?.Invoke(options);
|
||||
|
||||
Reference in New Issue
Block a user