Adding support for .NET 8.0 LTS, renaming private fields to start with underscore
This commit is contained in:
@@ -24,6 +24,7 @@ namespace Microsoft.EntityFrameworkCore
|
||||
/// <param name="optionsAction">An action to set additional options.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>true on success, otherwise false or an exception is thrown.</returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2208")]
|
||||
public static async Task<bool> ApplyMigrationsAsync(this DatabaseFacade database, Action<DatabaseMigrationOptions> optionsAction, CancellationToken cancellationToken = default)
|
||||
{
|
||||
if (database == null)
|
||||
|
||||
@@ -10,14 +10,14 @@ namespace AMWD.Common.EntityFrameworkCore.Extensions
|
||||
public static class ModelConfigurationBuilderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds converters for the <see cref="DateOnly"/> and <see cref="TimeOnly"/> datatypes introduced with .NET 6.0.
|
||||
/// Adds converters for the <see cref="DateOnly"/> datatype introduced with .NET 6.0.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// As of 2022-06-04 only required for Microsoft SQL server on .NET 6.0.
|
||||
/// </remarks>
|
||||
/// <param name="builder">The <see cref="ModelConfigurationBuilder"/> instance.</param>
|
||||
/// <returns>The <see cref="ModelConfigurationBuilder"/> instance after applying the converters.</returns>
|
||||
public static ModelConfigurationBuilder AddDateOnlyTimeOnlyConverters(this ModelConfigurationBuilder builder)
|
||||
public static ModelConfigurationBuilder AddDateOnlyConverters(this ModelConfigurationBuilder builder)
|
||||
{
|
||||
builder.Properties<DateOnly>()
|
||||
.HaveConversion<DateOnlyConverter>()
|
||||
@@ -26,6 +26,19 @@ namespace AMWD.Common.EntityFrameworkCore.Extensions
|
||||
.HaveConversion<NullableDateOnlyConverter>()
|
||||
.HaveColumnType("date");
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds converters for the <see cref="TimeOnly"/> datatype introduced with .NET 6.0.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// As of 2022-06-04 only required for Microsoft SQL server on .NET 6.0.
|
||||
/// </remarks>
|
||||
/// <param name="builder">The <see cref="ModelConfigurationBuilder"/> instance.</param>
|
||||
/// <returns>The <see cref="ModelConfigurationBuilder"/> instance after applying the converters.</returns>
|
||||
public static ModelConfigurationBuilder AddTimeOnlyConverters(this ModelConfigurationBuilder builder)
|
||||
{
|
||||
builder.Properties<TimeOnly>()
|
||||
.HaveConversion<TimeOnlyConverter>()
|
||||
.HaveColumnType("time");
|
||||
|
||||
Reference in New Issue
Block a user