Fusonic.Extensions.EntityFrameworkCore
9.5.2
Prefix Reserved
dotnet add package Fusonic.Extensions.EntityFrameworkCore --version 9.5.2
NuGet\Install-Package Fusonic.Extensions.EntityFrameworkCore -Version 9.5.2
<PackageReference Include="Fusonic.Extensions.EntityFrameworkCore" Version="9.5.2" />
paket add Fusonic.Extensions.EntityFrameworkCore --version 9.5.2
#r "nuget: Fusonic.Extensions.EntityFrameworkCore, 9.5.2"
// Install Fusonic.Extensions.EntityFrameworkCore as a Cake Addin #addin nuget:?package=Fusonic.Extensions.EntityFrameworkCore&version=9.5.2 // Install Fusonic.Extensions.EntityFrameworkCore as a Cake Tool #tool nuget:?package=Fusonic.Extensions.EntityFrameworkCore&version=9.5.2
EntityFrameworkCore
Extensions
Provides a set of extension methods to make common querying tasks easier. See QueryableExtensions.cs
Conventions
Provides a more sensible delete convention than EF Core's CascadeDeleteConvention
. NoActionDeleteConvention
sets NO ACTION
on your foreign key per default instead of CASCADE
, which forces all dependent foreign keys to also be deleted by the user.
With the default EF Core behavior, it is easy to create bugs that wouldn't be caught automatically by your testing. For example when referencing a User
in a History
and deleting the User
, the History
would be deleted as well. This is most likely not the desired behavior.
Therefore, if such a behavior is intended it should either be implemented
- by manually deleting all references in code
- by explicitly overriding the delete behavior on your foreign key
- by setting the foreign key as nullable
See https://github.com/dotnet/efcore/issues/27479, https://learn.microsoft.com/en-us/ef/core/saving/cascade-delete and https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK for more information.
To use this, add this to your DbContext
:
protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
{
configurationBuilder.Conventions.Remove<CascadeDeleteConvention>();
configurationBuilder.Conventions.Add(static _ => new NoActionDeleteConvention());
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net8.0
- Fusonic.Extensions.Common (>= 9.5.2)
- Microsoft.EntityFrameworkCore (>= 8.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
9.5.2 | 41 | 1/16/2025 |
9.5.0 | 185 | 10/4/2024 |
9.4.0 | 127 | 9/23/2024 |
9.3.1 | 188 | 9/11/2024 |
9.3.0 | 120 | 9/11/2024 |
9.2.0 | 145 | 8/8/2024 |
9.2.0-rc.3 | 80 | 8/7/2024 |
9.2.0-rc.2 | 49 | 8/5/2024 |
9.2.0-rc.1 | 61 | 8/1/2024 |
9.1.0 | 86 | 7/29/2024 |
9.0.0 | 532 | 7/17/2024 |
9.0.0-preview.2 | 73 | 6/13/2024 |
9.0.0-preview.1 | 117 | 4/5/2024 |
8.1.3 | 203 | 3/27/2024 |
8.1.2 | 127 | 3/27/2024 |
8.1.1 | 146 | 3/1/2024 |
8.1.0 | 1,239 | 1/26/2024 |
8.0.1 | 207 | 12/18/2023 |
8.0.1-rc.2 | 101 | 12/7/2023 |
8.0.1-rc.1 | 77 | 12/6/2023 |
8.0.0 | 274 | 11/21/2023 |
8.0.0-preview1 | 122 | 10/4/2023 |
7.4.0 | 105 | 1/25/2024 |
7.3.0 | 128 | 10/11/2023 |
7.2.1-rc.1 | 96 | 8/28/2023 |
7.2.0 | 136 | 6/28/2023 |
7.2.0-alpha.1 | 90 | 6/27/2023 |
7.1.2 | 557 | 5/25/2023 |
7.1.1 | 235 | 4/3/2023 |
7.1.1-rc.2 | 92 | 3/30/2023 |
7.1.1-rc.1 | 88 | 3/30/2023 |
7.1.0 | 1,403 | 2/28/2023 |
7.1.0-rc.1 | 101 | 2/20/2023 |
7.0.4-rc.5 | 103 | 2/23/2023 |
7.0.4-rc.4 | 104 | 2/23/2023 |
7.0.4-rc.3 | 98 | 2/23/2023 |
7.0.4-rc.2 | 102 | 2/22/2023 |
7.0.4-rc.1 | 98 | 2/16/2023 |
7.0.3 | 536 | 2/16/2023 |
7.0.2 | 282 | 2/9/2023 |
7.0.2-rc.1 | 116 | 2/2/2023 |
7.0.1 | 310 | 1/26/2023 |
7.0.0 | 781 | 1/24/2023 |
7.0.0-preview1 | 130 | 7/18/2022 |
7.0.0-beta.9 | 120 | 1/24/2023 |
7.0.0-beta.8 | 114 | 1/23/2023 |
7.0.0-beta.7 | 111 | 1/23/2023 |
7.0.0-beta.6 | 108 | 1/23/2023 |
7.0.0-beta.5 | 116 | 1/23/2023 |
7.0.0-beta.4 | 115 | 1/19/2023 |
7.0.0-beta.3 | 114 | 1/17/2023 |
7.0.0-beta.2 | 111 | 1/11/2023 |
7.0.0-beta.1 | 97 | 11/24/2022 |
6.2.2 | 1,310 | 9/20/2022 |
6.2.2-rc.1 | 131 | 9/19/2022 |
6.2.1 | 1,998 | 5/4/2022 |
6.2.0 | 501 | 4/21/2022 |
6.2.0-rc.2 | 139 | 4/21/2022 |
6.2.0-rc.1 | 134 | 4/20/2022 |
6.1.1 | 981 | 3/1/2022 |
6.1.0 | 541 | 2/10/2022 |
6.1.0-rc.3 | 125 | 2/10/2022 |
6.1.0-rc.2 | 124 | 2/10/2022 |
6.1.0-rc.1 | 130 | 2/9/2022 |
6.0.3 | 466 | 1/18/2022 |
6.0.2 | 303 | 1/10/2022 |
6.0.1 | 322 | 12/16/2021 |
6.0.0 | 320 | 12/13/2021 |
6.0.0-rc.6 | 151 | 12/6/2021 |
6.0.0-rc.5 | 340 | 12/6/2021 |
6.0.0-rc.4 | 491 | 12/6/2021 |
6.0.0-rc.3 | 377 | 12/6/2021 |
6.0.0-rc.2 | 353 | 12/6/2021 |
6.0.0-rc.1 | 189 | 11/15/2021 |
5.4.0 | 373 | 10/13/2021 |
5.3.0 | 329 | 9/23/2021 |
5.3.0-rc.1 | 168 | 9/17/2021 |
5.2.0 | 330 | 5/20/2021 |
5.2.0-rcjh.6 | 193 | 5/19/2021 |
5.2.0-rcjh.5 | 152 | 5/19/2021 |
5.2.0-rcjh.4 | 178 | 5/19/2021 |
5.2.0-rcjh.3 | 155 | 5/19/2021 |
5.2.0-rcjh.2 | 144 | 4/12/2021 |
5.2.0-rcjh.1 | 150 | 4/12/2021 |
5.1.3 | 376 | 5/19/2021 |
5.1.2 | 362 | 3/26/2021 |
5.1.1 | 398 | 1/13/2021 |
5.1.0 | 425 | 12/16/2020 |
5.0.0 | 420 | 11/17/2020 |
5.0.0-rc.1 | 248 | 10/15/2020 |
1.0.2 | 496 | 10/8/2020 |
1.0.1 | 510 | 8/19/2020 |
1.0.0 | 542 | 6/15/2020 |