Skip to content

Commit 825bc1a

Browse files
authored
Merge branch 'release/10.0' into merge/release/9.0-to-release/10.0
2 parents d08bbae + 3c2677e commit 825bc1a

2,720 files changed

Lines changed: 270193 additions & 180251 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: servicing-pr
3+
description: 'Create EF Core PRs targeting servicing release branches (release/*). Use when working on a PR that targets a release branch, backporting a fix from main, or when the user mentions servicing, patch, or release branch.'
4+
---
5+
6+
# Servicing PRs
7+
8+
PRs targeting `release/*` branches require a specific description format and should include a quirk (AppContext switch) when applicable.
9+
10+
## Backport Target Branch
11+
12+
- If a version is specified, target `release/XX.0` (e.g., `backport to 10``release/10.0`)
13+
- Otherwise, find the latest `release/XX.0` branch (ignore preview branches like `release/11.0-preview2`)
14+
- Verify the branch exists before creating the PR
15+
16+
## PR Title
17+
18+
`[release/XX.0] <original PR title>`
19+
20+
## PR Description Template
21+
22+
```
23+
Fixes #{issue_number}
24+
Backports #{source_pr_number_if_applicable}
25+
26+
**Description**
27+
Provide information on the bug, why it occurs and how it was introduced. Put it in terms that developers can understand without knowledge of EF Core internals.
28+
29+
**Customer impact**
30+
How the bug affects users without internal technical detail. Include a short (3-4 lines) code sample if possible. If data corruption occurs, state that explicitly. If a feasible workaround exists, briefly describe it and how discoverable it is, otherwise mention that there's no workaround.
31+
32+
**How found**
33+
How the bug was discovered based on the information in the issue description. If user-reported, mention "User reported on <version>". If multiple users are affected, note that. Count the number of upvotes and comment authors to estimate impact.
34+
35+
**Regression**
36+
Whether this is a regression from an earlier EF version. Add a link to the PR that introduced the regression if known. If it only affects a feature introduced in the same major version, it is not a regression.
37+
38+
**Testing**
39+
State the number of new or modified tests, don't go into details. If test coverage is unfeasible, briefly explain the alternative validation approach that was used.
40+
41+
**Risk**
42+
Brief risk assessment ranked from "extremely low" to "high". Note amount of code changed. If the fix is a one-liner, mention that. If a quirk was added, mention "Quirk added".
43+
```
44+
45+
## Quirk (AppContext Switch)
46+
47+
A quirk lets users opt out of the fix at runtime, reducing patch risk. Add for all cases where it makes sense. Skip when the fix is 100% obvious/risk-free, or when the quirk couldn't be used, like in tools or analyzers.
48+
49+
### Adding a Quirk
50+
51+
Add in the class(es) containing code changes:
52+
53+
```csharp
54+
private static readonly bool UseOldBehavior37585 =
55+
AppContext.TryGetSwitch("Microsoft.EntityFrameworkCore.Issue37585", out var enabled) && enabled;
56+
```
57+
58+
- Change `37585` to the relevant issue number
59+
- Wrap changes with a condition on `!UseOldBehavior37585` so activating the switch bypasses the fix, prefer to minimize the number of times the switch is checked
60+
- If the PR closes multiple issues, pick the most appropriate one for the switch name
61+
62+
## Validation
63+
64+
- PR description follows the template completely (all sections filled)
65+
- Quirk added where appropriate with issue number matching the PR description

.config/guardian/.gdnbaselines

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"hydrated": false,
3+
"properties": {
4+
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/baselines"
5+
},
6+
"version": "1.0.0",
7+
"baselines": {
8+
"default": {
9+
"name": "default",
10+
"createdDate": "2025-11-04 05:05:39Z",
11+
"lastUpdatedDate": "2025-11-04 05:05:39Z"
12+
}
13+
},
14+
"results": {
15+
"289457ef952517284338044be0d68120ad96554e2cd793b14a427b2208be2990": {
16+
"signature": "289457ef952517284338044be0d68120ad96554e2cd793b14a427b2208be2990",
17+
"alternativeSignatures": [
18+
"8b86228cd1b156622e76e1845b23b901cafd908a4dc0a7b7bdd5cdd714b726ab"
19+
],
20+
"memberOf": [
21+
"default"
22+
],
23+
"createdDate": "2025-11-04 05:05:39Z"
24+
}
25+
}
26+
}

.devcontainer/devcontainer.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "EF Core dev environment",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "devcontainer",
5+
"workspaceFolder": "/workspace",
6+
"customizations": {
7+
"vscode": {
8+
"extensions": [
9+
"ms-dotnettools.csdevkit",
10+
"EditorConfig.EditorConfig"
11+
],
12+
"settings": {
13+
"dotnet.dotnetPath": "${containerWorkspaceFolder}/efcore/.dotnet"
14+
}
15+
}
16+
},
17+
"remoteEnv": {
18+
"PATH": "${containerWorkspaceFolder}/efcore/.dotnet:${containerEnv:PATH}"
19+
},
20+
"onCreateCommand": "${containerWorkspaceFolder}/efcore/restore.sh"
21+
}

.devcontainer/docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: '3.8'
2+
services:
3+
devcontainer:
4+
image: mcr.microsoft.com/dotnet/sdk:9.0
5+
volumes:
6+
- ..:/workspace/efcore:cached
7+
tty: true

.editorconfig

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ indent_style = space
1010
trim_trailing_whitespace = true
1111
guidelines = 140
1212
max_line_length = 140
13+
tab_width = 4
14+
end_of_line = crlf
1315

1416
# Code files
1517
[*.{cs,csx,vb,vbx}]
@@ -79,6 +81,12 @@ dotnet_style_prefer_conditional_expression_over_return = true:suggestion
7981
dotnet_style_coalesce_expression = true:suggestion
8082
dotnet_style_null_propagation = true:suggestion
8183

84+
# Operator preferences
85+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
86+
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
87+
dotnet_style_prefer_compound_assignment = true:suggestion
88+
dotnet_style_operator_placement_when_wrapping = beginning_of_line
89+
8290
# CSharp code style settings:
8391
[*.cs]
8492
# Modifier preferences
@@ -97,6 +105,8 @@ csharp_style_expression_bodied_operators = true:suggestion
97105
csharp_style_expression_bodied_properties = true:suggestion
98106
csharp_style_expression_bodied_indexers = true:suggestion
99107
csharp_style_expression_bodied_accessors = true:suggestion
108+
csharp_style_expression_bodied_lambdas = true:suggestion
109+
csharp_style_expression_bodied_local_functions = true:suggestion
100110

101111
# Pattern matching
102112
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
@@ -120,6 +130,24 @@ csharp_prefer_braces = true:suggestion
120130
# Primary constructors
121131
csharp_style_prefer_primary_constructors = true:suggestion
122132

133+
# Using and Namespaces
134+
csharp_using_directive_placement = outside_namespace:silent
135+
csharp_prefer_simple_using_statement = true:suggestion
136+
csharp_style_namespace_declarations = file_scoped:silent
137+
138+
# Method groups
139+
csharp_style_prefer_method_group_conversion = true:silent
140+
141+
# Top-level statements
142+
csharp_style_prefer_top_level_statements = false:silent
143+
144+
# Implementation preferences
145+
csharp_prefer_system_threading_lock = true:suggestion
146+
147+
# Local functions
148+
csharp_style_prefer_local_over_anonymous_function = false:silent
149+
csharp_prefer_static_local_function = true:suggestion
150+
123151
## Formatting conventions
124152
# Dotnet formatting settings:
125153
[*.{cs,vb}]
@@ -253,3 +281,6 @@ dotnet_naming_rule.everything_else_naming.severity = suggestion
253281

254282
# ReSharper properties
255283
resharper_local_function_body = expression_body
284+
285+
# CS9236: Compiling requires binding the lambda expression at least 100 times
286+
dotnet_diagnostic.CS9236.severity = error

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
*.cs diff=csharp
33
*.sh eol=lf
44
*.sln eol=crlf
5+
*.sql diff

.github/CODEOWNERS

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
22
# See https://help.github.com/articles/about-code-owners/
33

4-
/azure-pipelines.yml @AndriySvyryd @maumar
5-
/azure-pipelines-public.yml @AndriySvyryd @maumar
6-
/eng/ @AndriySvyryd @maumar
7-
/eng/common/ @dotnet-maestro-bot @AndriySvyryd @maumar
8-
/eng/Versions.props @dotnet-maestro-bot @AndriySvyryd @maumar
9-
/eng/Version.Details.xml @dotnet-maestro-bot @AndriySvyryd @maumar
4+
/azure-pipelines.yml @AndriySvyryd @cincuranet
5+
/azure-pipelines-public.yml @AndriySvyryd @cincuranet
6+
/github-merge-flow.jsonc @AndriySvyryd @cincuranet
7+
/global.json @AndriySvyryd @cincuranet
8+
/NuGet.config @AndriySvyryd @cincuranet
9+
/.config/ @AndriySvyryd
10+
/.github/ @dotnet/efteam
11+
/eng/ @AndriySvyryd @cincuranet
12+
/src/ @dotnet/efteam
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: 🐛 Bug in Entity Framework Core
2+
description: Create a report about something that isn't working in Entity Framework Core.
3+
labels: ["customer-reported"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |-
8+
Remember:
9+
10+
* Please check that the [documentation](https://docs.microsoft.com/ef/) does not explain the behavior you are seeing.
11+
* Please search in both [open](https://github.com/dotnet/efcore/issues) and [closed](https://github.com/dotnet/efcore/issues?q=is%3Aissue+is%3Aclosed) issues to check that your bug has not already been filed.
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: Bug description
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: code
20+
attributes:
21+
label: Your code
22+
description: |-
23+
To fix any bug we must first reproduce it. To make this possible, please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing.
24+
25+
It is often impossible for us to reproduce a bug when working with only code snippets since we have to guess at the missing code.
26+
render: csharp
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: stack
31+
attributes:
32+
label: Stack traces
33+
description: |-
34+
Include the full exception message and stack trace for any exception you encounter.
35+
render: text
36+
validations:
37+
required: false
38+
- type: textarea
39+
id: output
40+
attributes:
41+
label: Verbose output
42+
description: |-
43+
Include `--verbose` output when filing bugs about the `dotnet ef` or Package Manager Console tools.
44+
render: text
45+
validations:
46+
required: false
47+
- type: input
48+
id: version-efcore
49+
attributes:
50+
label: EF Core version
51+
placeholder: |-
52+
9.0.0
53+
validations:
54+
required: true
55+
- type: input
56+
id: version-provider
57+
attributes:
58+
label: Database provider
59+
placeholder: |-
60+
Microsoft.EntityFrameworkCore.SqlServer
61+
validations:
62+
required: false
63+
- type: input
64+
id: version-target
65+
attributes:
66+
label: Target framework
67+
placeholder: |-
68+
.NET 9.0
69+
validations:
70+
required: false
71+
- type: input
72+
id: version-os
73+
attributes:
74+
label: Operating system
75+
placeholder: |-
76+
Windows 11
77+
validations:
78+
required: false
79+
- type: input
80+
id: version-ide
81+
attributes:
82+
label: IDE
83+
placeholder: |-
84+
Visual Studio 2022 17.4
85+
validations:
86+
required: false
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: 🐛 Bug in Microsoft.Data.Sqlite
2+
description: Create a report about something that isn't working in Microsoft.Data.Sqlite.
3+
labels: ["area-adonet-sqlite", "customer-reported"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |-
8+
Remember:
9+
10+
* Please check that the [documentation](https://docs.microsoft.com/ef/) does not explain the behavior you are seeing.
11+
* Please search in both [open](https://github.com/dotnet/efcore/issues) and [closed](https://github.com/dotnet/efcore/issues?q=is%3Aissue+is%3Aclosed) issues to check that your bug has not already been filed.
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: Bug description
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: code
20+
attributes:
21+
label: Your code
22+
description: |-
23+
To fix any bug we must first reproduce it. To make this possible, please attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing.
24+
25+
It is often impossible for us to reproduce a bug when working with only code snippets since we have to guess at the missing code.
26+
render: csharp
27+
validations:
28+
required: true
29+
- type: textarea
30+
id: stack
31+
attributes:
32+
label: Stack traces
33+
description: |-
34+
Include the full exception message and stack trace for any exception you encounter.
35+
render: text
36+
validations:
37+
required: false
38+
- type: input
39+
id: version-mds
40+
attributes:
41+
label: Microsoft.Data.Sqlite version
42+
placeholder: |-
43+
9.0.0
44+
validations:
45+
required: true
46+
- type: input
47+
id: version-target
48+
attributes:
49+
label: Target framework
50+
placeholder: |-
51+
.NET 9.0
52+
validations:
53+
required: false
54+
- type: input
55+
id: version-os
56+
attributes:
57+
label: Operating system
58+
placeholder: |-
59+
Windows 11
60+
validations:
61+
required: false

0 commit comments

Comments
 (0)