1
0
mirror of synced 2025-12-19 09:50:46 -05:00
Files
James Montemagno 215900a2bd .NET 10 Preview 5 (#9829)
* .NET 10 Preview 5

* update

* lint

* Add C# features in preview 5

Write the description for user defined compound assignment operators.

* Revert "Add C# features in preview 5"

This reverts commit 42e5ac6bff.

* Remove VB release notes for P5

There aren't notable new features in Visual Basic for Preview 5.

* Add notes about PQC

* Add PQC to the libraries ToC

* .NET 10 P5 - WinForms (#9919)

* winforms

* WinForms Preview 5

Preview 5 updates

* Fix duplicated intro

---------

Co-authored-by: Merrie McGaw <mmcgaw@microsoft.com>
Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>

* .NET 10 P5 - Containers (#9917)

* containers

* update for p5

* .NET 10 P5 - WPF (#9918)

* wpf

* Add notes

---------

Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>

* .NET 10 P5 Runtime (#9912)

* Update for Runtime

* Add JIT notes

* Fix GC notes

---------

Co-authored-by: Aman Khalid (from Dev Box) <amankhalid@microsoft.com>

* .NET 10 P5 - Languages (#9916)

* update csharp

* Add C# features in preview 5

Write the description for user defined compound assignment operators.

* Remove VB release notes for P5

There aren't notable new features in Visual Basic for Preview 5.

* Update fsharp.md

* Update fsharp.md

* Update fsharp.md

* add vb back just to link to docs

* update f#

* Update README.md

---------

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>

* updates for lint

* update (#9915)

* update for sdk (#9914)

* some more updates

* .NET MAUI in 10 Preview 5 (#9921)

* .NET MAUI in 10 Preview 5

* Update dotnetmaui.md

* added contributors

* hybridwebview interception

* addressing comments

---------

Co-authored-by: James Montemagno <james.montemagno@gmail.com>

* linting

* Update release-notes/10.0/preview/preview5/README.md

Co-authored-by: Martin Costello <martin@martincostello.com>

* Update release-notes/10.0/preview/preview5/README.md

Co-authored-by: Martin Costello <martin@martincostello.com>

* Update ef and date

* updating md file

* Added updates to README

---------

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
Co-authored-by: Merrie McGaw <mmcgaw@microsoft.com>
Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>
Co-authored-by: Aman Khalid (from Dev Box) <amankhalid@microsoft.com>
Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
Co-authored-by: David Ortinau <david.ortinau@microsoft.com>
Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: victorisr <victorisr@microsoft.com>
2025-06-10 09:57:27 -07:00

1.7 KiB

Entity Framework Core 10 Preview 5 - Release Notes

Here's a summary of what's new in Entity Framework Core in this preview release:

Entity Framework Core 10 updates:

Custom Default Constraint Names

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.

You can now specify a constraint name when defining default values in your model configuration:

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder.Entity<Blog>()
        .Property(b => b.IsActive)
        .HasDefaultValue(true, "DF_Blog_IsActive");

    modelBuilder.Entity<Post>()
        .Property(p => b.CreatedDate)
        .HasDefaultValueSql("GETDATE()", "DF_Post_CreatedDate");
}

You can also call UseNamedDefaultConstraints to enable automatic naming of all the default constraints. Note that if you have existing migrations then the next migration you add will rename every single default constraint in your model.

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder
        .UseNamedDefaultConstraints();
}