Skip to content

Commit 4d22a56

Browse files
committed
Tweaks to default constraint names section
1 parent efb52ef commit 4d22a56

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ Thanks to [@aradalvand](https://github.com/aradalvand) for proposing and pushing
188188

189189
<a name="default-constrain-names"></a>
190190

191-
## Custom Default Constraint Names
191+
## Custom default constraint names
192192

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.
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.
194194

195-
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:
196196

197197
```C#
198198
protected override void OnModelCreating(ModelBuilder modelBuilder)
@@ -213,8 +213,7 @@ You can also call `UseNamedDefaultConstraints` to enable automatic naming of all
213213
```C#
214214
protected override void OnModelCreating(ModelBuilder modelBuilder)
215215
{
216-
modelBuilder
217-
.UseNamedDefaultConstraints();
216+
modelBuilder.UseNamedDefaultConstraints();
218217
}
219218

220219
```

0 commit comments

Comments
 (0)