Skip to content

Commit 42c9fd1

Browse files
authored
What's new updates for 10.0-preview.5 (#5034)
1 parent cd28d5b commit 42c9fd1

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

entity-framework/core/modeling/generated-properties.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ You can also specify a SQL fragment that is used to calculate the default value:
2222

2323
[!code-csharp[Main](../../../samples/core/Modeling/GeneratedProperties/FluentAPI/DefaultValueSql.cs?name=DefaultValueSql&highlight=3)]
2424

25-
Starting with EF 10, for SQL Server you can explicitly specify the name for default value constraints, giving you more control over your database schema.
25+
Starting with EF 10, for SQL Server you can explicitly specify the name for default value constraints, giving you more control over your database schema.
2626

2727
[!code-csharp[Main](../../../samples/core/Modeling/GeneratedProperties/FluentAPI/DefaultValue.cs?name=DefaultValueNamed&highlight=3)]
2828

@@ -33,8 +33,7 @@ You can also call `UseNamedDefaultConstraints` to enable automatic naming of all
3333
```C#
3434
protected override void OnModelCreating(ModelBuilder modelBuilder)
3535
{
36-
modelBuilder
37-
.UseNamedDefaultConstraints();
36+
modelBuilder.UseNamedDefaultConstraints();
3837
}
3938

4039
```

entity-framework/core/what-is-new/ef-core-10.0/whatsnew.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ See [#12793](https://github.com/dotnet/efcore/issues/12793) and [#35367](https:/
139139
- Translate `COALESCE` as `ISNULL` on SQL Server, for most cases ([#34171](https://github.com/dotnet/efcore/pull/34171), contributed by [@ranma42](https://github.com/ranma42)).
140140
- Support some string functions taking `char` as arguments ([#34999](https://github.com/dotnet/efcore/pull/34999), contributed by [@ChrisJollyAU](https://github.com/ChrisJollyAU)).
141141
- Support `MAX`/`MIN`/`ORDER BY` using `decimal` on SQLite ([#35606](https://github.com/dotnet/efcore/pull/35606), contributed by [@ranma42](https://github.com/ranma42)).
142+
- Support projecting different navigations (but same type) via conditional operator ([#34589](https://github.com/dotnet/efcore/issues/34589), contributed by [@ranma42](https://github.com/ranma42)).
142143

143144
## ExecuteUpdateAsync now accepts a regular, non-expression lambda
144145

@@ -187,11 +188,11 @@ Thanks to [@aradalvand](https://github.com/aradalvand) for proposing and pushing
187188

188189
<a name="default-constrain-names"></a>
189190

190-
## Custom Default Constraint Names
191+
## Custom default constraint names
191192

192-
In previous versions of EF Core, when you specified a default value for a property, EF Core would always let the database automatically generate a constraint name. Now, you can explicitly specify the name for default value constraints for SQL Server, giving you more control over your database schema.
193+
In previous versions of EF Core, when you specified a default value for a property, EF Core would always let the database automatically generate a constraint name. Now, you can explicitly specify the name for default value constraints for SQL Server, giving you more control over your database schema.
193194

194-
You can now specify a constraint name when defining default values in your model configuration:
195+
You can now specify a constraint name when defining default values in your model configuration:
195196

196197
```C#
197198
protected override void OnModelCreating(ModelBuilder modelBuilder)
@@ -212,8 +213,7 @@ You can also call `UseNamedDefaultConstraints` to enable automatic naming of all
212213
```C#
213214
protected override void OnModelCreating(ModelBuilder modelBuilder)
214215
{
215-
modelBuilder
216-
.UseNamedDefaultConstraints();
216+
modelBuilder.UseNamedDefaultConstraints();
217217
}
218218

219219
```

0 commit comments

Comments
 (0)