Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ await this.Db.RaceResult
// FROM [RaceResult] AS [r]
// WHERE DATEDIFF_BIG(SECOND, [r].[StartTime], '2019-07-01T00:00:00.0000000Z') >= CAST(100000 AS bigint)
```
* 9.1.0 (Mar 14, 2025)
* Added support for Azure SQL DB's and the `AzureSqlDbContextOptionsBuilder`
* 9.0.0 (Nov 20, 2024)
* Release for EF Core 9
* 9.0.0-rc.1.24451.1 (Sept 27, 2024)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.SqlServer.Infrastructure;
using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.EntityFrameworkCore;

public static class AzureSqlDbContextOptionsBuilderExtensions
{
public static AzureSqlDbContextOptionsBuilder UseNodaTime(
this AzureSqlDbContextOptionsBuilder azureBuilder)
{
// Access the underlying OptionsBuilder
var coreOptionsBuilder = ((IRelationalDbContextOptionsBuilderInfrastructure)azureBuilder).OptionsBuilder;

// Look for the NodaTime extension or create a new instance if not found
var extension = coreOptionsBuilder.Options.FindExtension<NodaTimeOptionsExtension>()
?? new NodaTimeOptionsExtension();

// Add or update the extension in the options
((IDbContextOptionsBuilderInfrastructure)coreOptionsBuilder).AddOrUpdateExtension(extension);

return azureBuilder;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageProjectUrl>https://github.com/StevenRasmussen/EFCore.SqlServer.NodaTime</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Entity Framework Core;entity-framework-core;EF;Data;O/RM;EntityFrameworkCore;EFCore;Noda;NodaTime;Noda Time</PackageTags>
<Version>9.0.0</Version>
<Version>9.1.0</Version>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

Expand Down
Loading