Skip to content

Commit 5d80e90

Browse files
2 parents 46417f9 + 184f9b2 commit 5d80e90

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ await this.Db.RaceResult
211211
// FROM [RaceResult] AS [r]
212212
// WHERE DATEDIFF_BIG(SECOND, [r].[StartTime], '2019-07-01T00:00:00.0000000Z') >= CAST(100000 AS bigint)
213213
```
214+
* 9.1.0 (Mar 14, 2025)
215+
* Added support for Azure SQL DB's and the `AzureSqlDbContextOptionsBuilder`
214216
* 9.0.0 (Nov 20, 2024)
215217
* Release for EF Core 9
216218
* 9.0.0-rc.1.24451.1 (Sept 27, 2024)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using Microsoft.EntityFrameworkCore.Infrastructure;
2+
using Microsoft.EntityFrameworkCore.SqlServer.Infrastructure;
3+
using Microsoft.Extensions.DependencyInjection;
4+
5+
namespace Microsoft.EntityFrameworkCore;
6+
7+
public static class AzureSqlDbContextOptionsBuilderExtensions
8+
{
9+
public static AzureSqlDbContextOptionsBuilder UseNodaTime(
10+
this AzureSqlDbContextOptionsBuilder azureBuilder)
11+
{
12+
// Access the underlying OptionsBuilder
13+
var coreOptionsBuilder = ((IRelationalDbContextOptionsBuilderInfrastructure)azureBuilder).OptionsBuilder;
14+
15+
// Look for the NodaTime extension or create a new instance if not found
16+
var extension = coreOptionsBuilder.Options.FindExtension<NodaTimeOptionsExtension>()
17+
?? new NodaTimeOptionsExtension();
18+
19+
// Add or update the extension in the options
20+
((IDbContextOptionsBuilderInfrastructure)coreOptionsBuilder).AddOrUpdateExtension(extension);
21+
22+
return azureBuilder;
23+
}
24+
}

src/SimplerSoftware.EntityFrameworkCore.SqlServer.NodaTime/SimplerSoftware.EntityFrameworkCore.SqlServer.NodaTime.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageProjectUrl>https://github.com/StevenRasmussen/EFCore.SqlServer.NodaTime</PackageProjectUrl>
1414
<RepositoryType>git</RepositoryType>
1515
<PackageTags>Entity Framework Core;entity-framework-core;EF;Data;O/RM;EntityFrameworkCore;EFCore;Noda;NodaTime;Noda Time</PackageTags>
16-
<Version>9.0.0</Version>
16+
<Version>9.1.0</Version>
1717
<PackageReadmeFile>README.md</PackageReadmeFile>
1818
</PropertyGroup>
1919

0 commit comments

Comments
 (0)