1
0
mirror of synced 2025-12-19 09:50:46 -05:00
Files
core/release-notes/10.0/preview/rc1/efcore.md
Jon Galloway f827ae7908 Add release notes for .NET 10 RC 1 across various components (#10061)
* Add RC1 release notes template files

* Add missing aspnetcore.md template file

* Update RC1 release notes to proper template format and update prompt file

* Add release notes for .NET 10 RC 1 across various components

* Fix markdownlint issues in createprs-for-preview.prompt.md

* Update createprs-for-preview prompt with detailed instructions for handling "TBD" placeholders and adding a master consolidation PR process

* Servicing Release markdowns and json Updates for 10.0 RC1

* Added ./rc1/README.md

* Fix formatting of version-aspnetcoremodule entries and ensure newline at end of file in release notes JSON files

* Update csharp for RC 1 (#10051)

* Update csharp for RC 1

* Update C# release notes for .NET 10 RC 1 (no notable features)

* Update wpf for RC 1 (#10060)

* Update wpf for RC 1

* Update WPF release notes for .NET 10 RC 1 to clarify absence of new features

* Update containers for RC 1 (#10050)

* Update containers for RC 1

* Clarify that the .NET 10 RC 1 release does not include new Container image features in the release notes.

* Update runtime for RC 1 (#10056)

* Update runtime for RC 1

* Update runtime release notes for .NET 10 RC 1

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Revise SDK release notes for .NET 10 RC 1 to emphasize quality improvements and encourage developer feedback

* Update sdk for RC 1 (#10057)

* Clarify that .NET 10 RC 1 does not introduce new Visual Basic features and direct users to relevant documentation

* Update aspnetcore for RC 1 (#10049)

* Update fsharp for RC 1 (#10054)

* Update fsharp for RC 1

* Fix fsharp: replace TBD with content

* Update F# release notes for .NET 10 RC 1 to clarify absence of new features

---------

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

* Update dotnetmaui for RC 1 (#10052)

* Update dotnetmaui for RC 1

* Fix duplicate content in dotnetmaui

* look! We have release notes

added maui and android. Need yet macios and contributors list.

* Apply suggestions from code review

* Update release-notes/10.0/preview/rc1/dotnetmaui.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update release-notes/10.0/preview/rc1/dotnetmaui.md

Co-authored-by: Jon Galloway <jongalloway@gmail.com>

* Update release-notes/10.0/preview/rc1/dotnetmaui.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add images

* add bullet for experimental

* update lint

---------

Co-authored-by: David Ortinau <david.ortinau@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: James Montemagno <james.montemagno@gmail.com>

* Update libraries for RC 1 (#10055)

* Update libraries for RC 1

* Fix libraries: replace TBD with content

* Add PQC notes

* Fix trailing whitespace

* Update release-notes/10.0/preview/rc1/libraries.md

Co-authored-by: Tanner Gooding <tagoo@outlook.com>

* updates

* update link

* updates

---------

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
Co-authored-by: James Montemagno <james.montemagno@gmail.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>

* Update winforms for RC 1 (#10059)

* Update winforms for RC 1

* Update WinForms release notes for .NET 10 RC1

Thanks @KlausLoeffelmann for the content!

---------

Co-authored-by: Merrie McGaw <mmcgaw@microsoft.com>

* Update efcore for RC 1 (#10053)

* Update efcore for RC 1

* Fix efcore: replace TBD with content

* EF Core release notes for rc.1

---------

Co-authored-by: Shay Rojansky <roji@roji.org>

* markdownlint fixes for WinForms RC1 release notes

* Update Language Version in releases.json

* Update release.json for Language version support

* updates

* filled out maui contributor GitHub handles

* Revise Visual Studio compatibility information

---------

Co-authored-by: victorisr <victorisr@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: James Montemagno <james.montemagno@gmail.com>
Co-authored-by: David Ortinau <david.ortinau@microsoft.com>
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Co-authored-by: Merrie McGaw <mmcgaw@microsoft.com>
Co-authored-by: Shay Rojansky <roji@roji.org>
Co-authored-by: Rahul Bhandari <rbhanda@microsoft.com>
2025-09-09 09:39:12 -07:00

5.4 KiB

Entity Framework Core in .NET 10 RC 1 - Release Notes

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

Entity Framework Core 10 updates:

EF 10 brings full support for the recently-introduced vector data type and its supporting VECTOR_DISTANCE() function, available on Azure SQL Database and on SQL Server 2025.

To use the vector data type, simply add a .NET property of type SqlVector<float> to your entity type:

public class Blog
{
    // ...

    [Column(TypeName = "vector(1536)")]
    public SqlVector<float> Embedding { get; set; }
}

Then, insert embedding data by populating the Embedding property and calling SaveChangesAsync() as usual:

IEmbeddingGenerator<string, Embedding<float>> embeddingGenerator = /* Set up your preferred embedding generator */;

var embedding = await embeddingGenerator.GenerateVectorAsync("Some text to be vectorized");
context.Blogs.Add(new Blog
{
    Name = "Some blog",
    Embedding = new SqlVector<float>(embedding)
});
await context.SaveChangesAsync();

For more information on vector search, see the documentation.

SQL Server JSON type support

EF 10 fully supports the new JSON data type, available on Azure SQL Database and on SQL Server 2025:

public class Blog
{
    public int Id { get; set; }

    public string[] Tags { get; set; }
    public required BlogDetails Details { get; set; }
}

public class BlogDetails
{
    public string? Description { get; set; }
    public int Viewers { get; set; }
}

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder.Entity<Blog>().ComplexProperty(b => b.Details, b => b.ToJson());
}

When configured to target SQL Server 2025, EF 10 creates the following table for the above:

CREATE TABLE [Blogs] (
    [Id] int NOT NULL IDENTITY,
    [Name] nvarchar(max) NOT NULL,
    [Tags] json NOT NULL,
    [Details] json NOT NULL,
    CONSTRAINT [PK_Blogs] PRIMARY KEY ([Id])
);

For more information, see the EF what's new page.

EF 10 brings support for the new Cosmos full-text feature:

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder.Entity<Blog>(b =>
    {
        b.Property(x => x.Contents).EnableFullTextSearch();
        b.HasIndex(x => x.Contents).IsFullTextIndex();
    });
}

var cosmosBlogs = await context.Blogs
    .Where(x => EF.Functions.FullTextContains(x.Contents, "cosmos"))
    .ToListAsync();

The new hybrid search capability, which allows combining full-text and vector search, is also supported:

float[] myVector = /* generate vector data from text, image, etc. */
var hybrid = await context.Blogs.OrderBy(x => EF.Functions.Rrf(
        EF.Functions.FullTextScore(x.Contents, "database"), 
        EF.Functions.VectorDistance(x.Vector, myVector)))
    .Take(10)
    .ToListAsync();

For more information, see the documentation.

Complex types

EF 10 introduces substantially improved support for complex types, which are designed to map nested types to the database, either via JSON or by mapping their columns to the same table as their container:

modelBuilder.Entity<Customer>(b =>
{
    // Maps the columns of ShippingAddress to the Customer table
    b.ComplexProperty(c => c.ShippingAddress);
    // Maps BillingAddress to a single JSON column in the Customer table
    b.ComplexProperty(c => c.BillingAddress, c => c.ToJson());
});

Once your nested type has been mapped, it can be fully queried via LINQ and updated via the usual EF mechanisms. Note that while EF has supported nested mapping via owned entity types, complex types represent a better alternative that fixes many of the problems encountered with owned entity types.

Note that this the complex type support was considerably improved after RC1, and many bugs have been fixed for RC2; to use the full extent of the feature, it's advised to wait for RC2.

Padding for parameterized collections

Building on top of the improved translation for parameterized collection introduced in preview 7 (docs), in RC1 EF also introduces parameter padding, which further optimizes the generated SQL. See the EF what's new page for more details.

Everything else in RC1

The full list of issues completed for RC1 can be found here.