Skip to content
CAI
Software that uses CAICheck a score

dotnet/efcore

61.9

Adequate · 5 August 2026

472.8k

lines of production code

C#

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a comprehensive data access and object-relational mapping (ORM) framework, primarily centered around Entity Framework Core, with specific implementations for SQL Server, Cosmos DB, SQLite, and In-Memory databases. It provides a robust infrastructure for database schema management, including automated migrations, code generation, and reverse engineering (scaffolding) of existing databases. The framework supports advanced querying capabilities, such as split queries, raw SQL execution, and complex type mapping, while also offering performance benchmarking tools and static analysis to enforce code safety and best practices.

How it got here

2014–2017 — Architecture modernization and provider expansion

104 changes.

This period focused on modernizing the Entity Framework Core codebase by introducing C\# 10+ features like file-scoped namespaces and records, and centralizing package version management. Significant architectural refactors were applied to the relational, SQL Server, and SQLite providers, alongside the introduction of precompiled queries, complex type collections, and enhanced scaffolding capabilities.

2018–2019 — provider feature expansion and internal refactoring

64 changes.

This period focused on expanding feature sets for specific database providers, including spatial data support for SQL Server and SQLite, and advanced query capabilities for Cosmos DB. Concurrently, the codebase underwent significant internal refactoring to improve extensibility, observability, and build infrastructure.

2020–2026 — Compiled model and precompiled query infrastructure

36 changes.

This period focused on establishing the internal infrastructure for compiled models and precompiled queries, enabling NativeAOT compatibility and runtime code generation. The work included introducing C\# code generators for relational mappings, query translation, and migration bundles, alongside API baseline management tools. Additionally, it expanded support for specific database features like SQL Server temporal tables, HierarchyId, and JSON serialization across providers.

Features

Add API baselines and documentation for EF Core SQLite providers

Introduced API baseline files (EFCore.Sqlite.Core.baseline.json and EFCore.Sqlite.NTS.baseline.json) that define the public surface area for the SQLite and NetTopologySuite providers, including types like SqliteDbContextOptionsBuilder, SqliteDbFunctionsExtensions, and SqliteNetTopologySuiteDbContextOptionsBuilder. Added corresponding README.md files for both packages to guide users on installation and configuration, and added internal Statics.cs files containing pre-allocated boolean arrays for testing or internal use.

src/EFCore.Sqlite.Core, src/EFCore.Sqlite.NTS · high confidence

Add HierarchyId support for SQL Server in EF Core

This change introduces support for the SQL Server \hierarchyid\ data type in Entity Framework Core. Users can now map \HierarchyId\ and \SqlHierarchyId\ properties to the \hierarchyid\ database column type. The update includes type mappings, value converters, and method call translators for HierarchyId operations (such as \GetAncestor\, \GetDescendant\, \IsDescendantOf\, etc.), enabling these queries to be translated to SQL. Additionally, JSON serialization and deserialization for \HierarchyId\ types are supported via new reader/writer implementations. The feature is activated by calling \UseHierarchyId()\ on the SQL Server options builder and registering the service via \AddEntityFrameworkSqlServerHierarchyId()\.

src/EFCore.SqlServer.HierarchyId · high confidence

Add HierarchyId type and JSON converter to EF Core SqlServer Abstractions

The \Microsoft.EntityFrameworkCore.SqlServer.Abstractions\ package now includes a new \HierarchyId\ class and a corresponding \HierarchyIdJsonConverter\ for JSON serialization. This allows developers to use SQL Server's hierarchical data type in POCO entity types without depending on the full \Microsoft.EntityFrameworkCore.SqlServer\ package, supporting operations like getting ancestors, descendants, and reparenting nodes.

src/EFCore.SqlServer.Abstractions · high confidence

Add NetTopologySuite support for SQL Server spatial data

Entity Framework Core now supports spatial data via NetTopologySuite for SQL Server. Users can enable this support by calling \UseNetTopologySuite()\ on the SQL Server options builder and registering the required services via \AddEntityFrameworkSqlServerNetTopologySuite()\. This adds type mappings, method/property translators for geometry operations (e.g., \STArea\, \STDistance\, \CurveToLine\), and design-time scaffolding services, enabling LINQ queries against spatial columns to be translated to SQL Server spatial functions.

src/EFCore.SqlServer.NTS · high confidence

Add NetTopologySuite support for SQLite in EF Core

Users can now configure Entity Framework Core to use NetTopologySuite for handling spatial data in SQLite databases. This is achieved by calling the new \UseNetTopologySuite\ extension on \SqliteDbContextOptionsBuilder\ and registering the required services via \AddEntityFrameworkSqliteNetTopologySuite\ on the \IServiceCollection\. These additions enable spatial data access and query translation for SQLite, consistent with other database providers.

src/EFCore.Sqlite.NTS/Extensions · high confidence

Add ProjectCommandBase command class

A new ProjectCommandBase class has been introduced in the EF Core tools, serving as a base for project-related commands. It configures the command line application by adding ProjectOptions and invoking the base configuration.

src/dotnet-ef/Commands · high confidence

Add SQLite NTS code generator plugin for reverse engineering

Introduced SqliteNetTopologySuiteCodeGeneratorPlugin to enable plugins to generate provider and DbContext options during reverse engineering, specifically adding support for NetTopologySuite in SQLite scaffolding.

src/EFCore.Sqlite.NTS/Scaffolding · high confidence

Add SQLite spatial data support via NetTopologySuite

Users can now store and retrieve spatial geometry types in SQLite databases using the NetTopologySuite library. This change introduces a new value converter that serializes and deserializes geometry objects to and from byte arrays, enabling Entity Framework Core to map spatial data types to SQLite storage.

src/EFCore.Sqlite.NTS/Storage/ValueConversion · medium confidence

Add SQLite spatial query translation for NetTopologySuite types

The SQLite provider for Entity Framework Core now includes new query translators for NetTopologySuite geometry types. This change adds member and method translators for \Geometry\, \GeometryCollection\, \LineString\, \MultiLineString\, \Point\, and \Polygon\, enabling the translation of spatial properties and methods to SQLite spatialite functions. Additionally, aggregate method translations are added to support spatial operations like \Union\, \ConvexHull\, and \EnvelopeCombine\ in queries.

src/EFCore.Sqlite.NTS/Query · high confidence

Add SQLite-specific JSON reader/writers for multiple data types

The SQLite provider now includes dedicated internal JSON serialization classes for byte arrays, DateTimeOffset, DateTime, decimal, Guid, and Half. These implementations ensure that JSON values are formatted to match SQLite's non-JSON storage representations (e.g., hex strings for bytes, specific date formats, and uppercase GUIDs), providing consistent behavior when storing and retrieving JSON data in SQLite.

src/EFCore.Sqlite.Core/Storage/Json · high confidence

Add change tracking support for complex type collections

The change tracking system now supports tracking collections of complex types. This is enabled by new classes including \ComplexCollectionEntry\, \ComplexElementEntry\, and \ComplexElementEntry\<T\>\, which provide access to change tracking and loading information for complex property collections. Additionally, \CascadeTiming\ and \ChangeTrackerDebugStringOptions\ enums are introduced to control cascading action timing and debug string formatting, while \ArrayStructuralComparer\ and \CaseInsensitiveValueComparer\ are added to handle value comparisons for arrays and case-insensitive strings.

src/EFCore/ChangeTracking · high confidence

Add diagnostic logging for Cosmos DB operations

The Entity Framework Core Cosmos provider now includes comprehensive internal diagnostic logging for key database operations, including SQL queries, read items, and batch executions. This enables developers to trace and monitor the performance and behavior of Cosmos DB interactions through standard .NET logging and diagnostic sources.

src/EFCore.Cosmos/Diagnostics/Internal · high confidence

Add in-memory database diagnostic event IDs

A new \InMemoryEventId\ class has been introduced to define specific event IDs for in-memory database operations, including \TransactionIgnoredWarning\ and \ChangesSaved\. This change provides structured logging identifiers that correspond to messages logged to an \ILogger\ and events sent to a \DiagnosticSource\, enabling users to filter and configure warnings for the in-memory provider.

src/EFCore.InMemory/Diagnostics · high confidence

Add metadata and value generation support for SQL Server full-text search and sequences

Developers can now configure SQL Server full-text catalogs and index metadata through new model-building interfaces (IConventionSqlServerFullTextCatalog, IMutableSqlServerFullTextCatalog, IReadOnlySqlServerFullTextCatalog, ISqlServerFullTextCatalog) and a SqlServerValueGenerationStrategy enum (None, SequenceHiLo, IdentityColumn, Sequence) to control how key values are generated from SQL Server columns.

src/EFCore.SqlServer/Metadata · high confidence

Add native tooling and build infrastructure scripts

The \eng/common/native\ directory now includes a comprehensive set of new scripts and configuration files to manage native tooling and build environments. This includes a PowerShell module (\CommonLibrary.psm1\) and a shell library (\common-library.sh\) providing utilities for downloading, extracting, and installing native tools (like CMake and C++ compilers) with retry logic and shimming. Additionally, new scripts (\init-compiler.sh\, \init-distro-rid.sh\, \install-dependencies.sh\) handle compiler detection, OS/Architecture identification, and dependency installation across Linux, macOS, and Windows. A new MSBuild target (\LocateNativeCompiler.targets\) and property file (\NativeAotSupported.props\) enable automatic detection of native compilers and restrict NativeAOT support to compatible operating systems and architectures.

eng/common/native · high confidence

Add relational value conversion mapping hints

A new \RelationalConverterMappingHints\ class has been introduced to support relational database-specific type mapping hints, including properties for fixed length and database type (DbType). This allows the Entity Framework Core relational provider to convey additional metadata about how value converters should map to database columns.

src/EFCore.Relational/Storage/ValueConversion · high confidence

Add support for precompiled queries

EF Core now supports precompiled queries, allowing users to compile LINQ queries once and reuse them for better performance. This change introduces new internal classes like \CompiledQuery\, \CompiledAsyncTaskQuery\, and \CompiledAsyncEnumerableQuery\ in the \src/EFCore/Query/Internal\ directory, which handle the compilation and execution of these precompiled query templates. The implementation includes a T4 template (\CompiledQuery.tt\) to generate the necessary overloads for multiple parameters, supporting up to 15 parameters for both synchronous and asynchronous query execution.

src/EFCore/Query/Internal · high confidence

Added AdventureWorks benchmark models

The benchmark suite now includes a comprehensive set of entity classes and a base DbContext for the AdventureWorks database schema. This adds support for running performance tests against a realistic, complex data model with numerous relationships and configurations, allowing for more representative benchmarking of Entity Framework Core's behavior on a full-featured database schema.

benchmark/EFCore.Benchmarks/Models/AdventureWorks · high confidence

Added EnumerableExtensions utility for SQL Server provider

A new internal utility class, EnumerableExtensions, has been added to the SQL Server provider's utilities folder. This introduces a Join extension method for stringifying enumerables and a Distinct extension method that accepts a custom equality comparison function, enabling more flexible distinct operations on object sequences within the provider.

src/EFCore.SqlServer/Utilities · high confidence

Added ObservableCollectionListSource for Windows Forms data binding

A new ObservableCollectionListSource class has been added to the EF Core Abstractions package. This class extends ObservableCollection and implements IListSource to provide an IBindingList that stays in sync with the collection, enabling Windows Forms data binding for navigation properties. It is not intended for WPF, which should use standard ObservableCollection.

src/EFCore.Abstractions/ChangeTracking · high confidence

Added Orders benchmark model and fixture

Added new benchmark models for an Orders domain, including Customer, Order, OrderLine, and Product entities, along with the corresponding EF Core context and fixture classes to support benchmarking scenarios.

benchmark/EFCore.Benchmarks/Models/Orders · high confidence

Added SQLite scaffolding diagnostic logging

A new \SqliteLoggerExtensions\ class was added to the \src/EFCore.Sqlite.Core/Extensions/Internal\ directory, introducing logging methods for various SQLite scaffolding scenarios. These include warnings and informational logs for table and column discovery, handling of schema configurations, sequence configurations, and foreign key reference issues during the reverse-engineering process. This enhances the diagnostic output available to developers and tools interacting with the SQLite provider.

src/EFCore.Sqlite.Core/Extensions/Internal · high confidence

The update introduces new builder classes in the metadata builders namespace to support SQL Server-specific features. For temporal tables, it adds \TemporalTableBuilder\ and \TemporalPeriodPropertyBuilder\ (along with generic and owned-navigation variants) to configure history tables, period start/end properties, column names, precision, and the HIDDEN flag. For full-text search, it adds \SqlServerFullTextCatalogBuilder\ and \SqlServerFullTextIndexBuilder\ (with generic variants) to configure full-text catalogs, index names, key indexes, change tracking modes, and language settings.

src/EFCore.SqlServer/Metadata/Builders · high confidence

Added code generators for EF Core migration bundles

Introduced new template-based code generators (BundleProgramGenerator and BundleProjectGenerator) that produce the C\# program and .csproj files required for Entity Framework Core migration bundles. This enables the \migrations bundle\ CLI command to generate a self-contained executable project that includes the necessary EF Core design-time dependencies and references to the startup and target projects.

src/ef/Generators · high confidence

Added cold-start and initialization benchmarks

Added new benchmark tests for cold-start and initialization scenarios, including a ColdStartSandbox for isolated AppDomain execution, an Extensions helper for query tracking, and an InitializationTests suite that measures context creation, disposal, and model building performance.

benchmark/EFCore.Benchmarks/Initialization · high confidence

Added common build and tooling scripts from Arcade

The \eng/common\ directory now contains a comprehensive set of build, installation, and configuration scripts (including \build.sh\, \build.ps1\, \SetupNugetSources.ps1\, and \darc-init.sh\) sourced from the .NET Arcade repository. These scripts provide standardized mechanisms for restoring, building, testing, and configuring the .NET SDK and internal package feeds, ensuring consistent build behavior across .NET repositories.

eng/common · high confidence

Added cross-compilation tooling for Tizen and Android

Added new scripts and configuration files to support cross-compiling for Tizen and Android platforms. This includes shell scripts (build-rootfs.sh, build-android-rootfs.sh, tizen-build-rootfs.sh, tizen-fetch.sh) and Python utilities (install-debs.py) to download, extract, and configure root filesystems for these targets. Additionally, patch files (tizen.patch) are added for various architectures (arm, arm64, x64, x86, riscv64) to fix linker group definitions in libc.so, and the CMake toolchain configuration (toolchain.cmake) is updated to recognize and configure toolchains for Tizen and Android environments.

eng/common/cross · high confidence

Added database cleanup and API review tools

New utility scripts and templates have been added to the tools directory to improve local development and maintenance workflows. This includes scripts to clean and shrink the default LocalDB instance (CleanMSSQLLocalDB.cmd, ShrinkLocalDBModel.cmd), a script to drop all Cosmos emulator databases (DropAllCosmosDatabases.ps1), and a SQL script to drop all user databases (DropAllDatabases.sql). Additionally, a PowerShell script (PrepForAPIReview.ps1) and a T4 template (Resources.tt) were added to support the ApiChief tool for generating API baselines and reviewing public surface changes.

tools · high confidence

Added internal command-line parsing utilities

The src/ef/CommandLineUtils directory now contains a new set of internal classes (CommandArgument, CommandLineApplication, CommandOption, etc.) that provide a lightweight, internal framework for parsing command-line arguments, options, and subcommands for the .NET CLI tools.

src/ef/CommandLineUtils · high confidence

Added internal sorting and binding list implementations for change tracking

The EF Core abstractions package now includes two new internal classes, \SortableBindingList\<T\>\ and \ObservableBackedBindingList\<T\>\, located in \src/EFCore.Abstractions/ChangeTracking/Internal\. These classes provide a sortable, observable list implementation that synchronizes with an underlying \ObservableCollection\, enabling more efficient change tracking and data binding scenarios within the framework's internal infrastructure.

src/EFCore.Abstractions/ChangeTracking/Internal · high confidence

Added internal value generators for temporary numeric types and converted values

The Entity Framework Core infrastructure now includes new internal value generators to support temporary value generation for various numeric types (byte, char, decimal, double, float, int, long, sbyte, short, uint, ulong, ushort) and for converted types. These generators, located in the \Microsoft.EntityFrameworkCore.ValueGeneration.Internal\ namespace, provide the underlying mechanism for generating temporary values for these specific data types, enabling the framework to handle temporary value generation more granularly across different numeric and converted types.

src/EFCore/ValueGeneration/Internal · high confidence

Added post-build validation and publishing scripts

New PowerShell scripts have been added to the \eng/common/post-build\ directory to enhance the build pipeline. \check-channel-consistency.ps1\ validates that build channels match YAML configuration. \nuget-validation.ps1\ and \nuget-verification.ps1\ verify NuGet package metadata using the \NuGet.VerifyMicrosoftPackage\ tool. \publish-using-darc.ps1\ handles build promotion to default channels via Darc. \redact-logs.ps1\ uses the \binlogtool\ to redact sensitive data from logs. \symbols-validation.ps1\ checks for the presence of symbols on MSDL and SymWeb servers.

eng/common/post-build · high confidence

Added support for loading SpatiaLite extensions in SQLite

Introduced the SpatialiteLoader class to automatically find and load the mod\_spatialite native extension for SQLite, enabling spatial data support. The implementation searches for the extension in framework-dependent deployments and handles platform-specific loading (Windows/Linux) with a retry mechanism for environment variable access.

src/EFCore.Sqlite.Core/Infrastructure · high confidence

Adds SQL Server temporal query root expressions and SQL function expressions

The SQL Server provider now includes new internal expression classes to support temporal queries and SQL functions. Temporal query root expressions (TemporalAllQueryRootExpression, TemporalAsOfQueryRootExpression, TemporalBetweenQueryRootExpression, TemporalContainedInQueryRootExpression, TemporalFromToQueryRootExpression) enable querying historical data in SQL Server temporal tables. Additionally, SqlServerExpression provides helper methods for aggregate functions, while SqlServerJsonObjectExpression and SqlServerOpenJsonExpression support JSON functions, and WithApproximateExpression supports approximate query hints.

src/EFCore.SqlServer/Query/Internal/SqlExpressions · high confidence

Automatic loading of NetTopologySuite services at design-time

A new design-time service registration for Entity Framework Core's SQLite with NetTopologySuite support has been added. This change enables the reverse engineering (scaffolding) process to automatically load the necessary NetTopologySuite services, ensuring that spatial data types are correctly handled during the generation of DbContext and entity classes.

src/EFCore.Sqlite.NTS/Design · high confidence

Cosmos DB query pipeline modernized with new internal query context and translation infrastructure

The query pipeline for the Cosmos DB provider has been restructured with new internal classes to support advanced query features. A new \CosmosPage\<T\>\ struct enables pagination support via \ToPageAsync\, returning a page of results along with a continuation token. The \CosmosQueryContext\ and \CosmosQueryCompilationContext\ have been extended to manage state such as partition keys and alias generation. Additionally, the \CosmosQueryTranslationPostprocessor\ now handles value converter compensation, alias post-processing, and partition key extraction, while the \CosmosQuerySqlGenerator\ and \CosmosProjectionBindingExpressionVisitor\ have been updated to support complex projections and subqueries. These changes lay the groundwork for features like full-text search and vector search by providing a more robust and modular query translation framework.

src/EFCore.Cosmos/Query · high confidence

Cosmos provider adds configuration APIs for complex types, full-text search, and vector search

The Azure Cosmos DB provider now exposes new extension methods to configure complex type properties, including mapping to specific JSON property names via \ToJsonProperty\. It also adds support for enabling full-text search on properties using \EnableFullTextSearch\, and configures vector properties with \IsVectorProperty\ to define distance functions and dimensions. Additionally, \CosmosDbFunctionsExtensions\ provides LINQ-compatible database functions for full-text search (\FullTextContains\, \FullTextScore\, \Rrf\) and vector distance calculations (\VectorDistance\), while \CosmosDatabaseFacadeExtensions\ exposes methods to manage session tokens and retrieve the underlying \CosmosClient\.

src/EFCore.Cosmos/Extensions · high confidence

Expanded SQL Server query translation for date, time, and math functions

The SQL Server query translator now supports a broader range of .NET methods and properties, including \DateOnly\ members and methods (e.g., \ToDateTime\, \AddYears\), \DateTime\/\DateTimeOffset\ members (e.g., \Microsecond\, \Nanosecond\, \UtcNow\), and \SqlServerDbFunctionsExtensions\ functions (e.g., \DateFromParts\, \AtTimeZone\, \FreeText\). Additionally, the \Math\ translator now handles \Math.Max\/\Math.Min\ and other math operations, while \Convert\ and \ByteArray\ methods are also translated to their corresponding SQL Server functions. These changes enable more complex LINQ queries involving date/time manipulation, string operations, and mathematical functions to be executed directly on the database.

src/EFCore.SqlServer/Query/Internal/Translators · high confidence

ILazyLoader interface and LazyLoaderExtensions added

The ILazyLoader interface and LazyLoaderExtensions class have been added to the EFCore.Abstractions project. The interface provides methods for lazy loading navigation properties, including synchronous and asynchronous loading, checking load status, and disposal. The extension methods provide a convenient way to load navigation properties from entity classes. This change introduces new API surface for lazy loading functionality.

src/EFCore.Abstractions/Infrastructure · high confidence

In-memory database provider extension methods and service registration

The in-memory database provider is now exposed through dedicated extension classes: \InMemoryDatabaseFacadeExtensions\ adds an \IsInMemory()\ method to detect the provider, \InMemoryDbContextOptionsExtensions\ provides \UseInMemoryDatabase()\ overloads that support a shared \InMemoryDatabaseRoot\ for cross-provider database sharing, and \InMemoryEntityTypeBuilderExtensions\ exposes \ToInMemoryQuery()\ to configure defining queries for entity types. Additionally, \InMemoryServiceCollectionExtensions\ registers all required in-memory services, including the \InMemoryDatabaseRootCache\ and \InMemoryTableFactory\, enabling the in-memory provider to function within the dependency injection container.

src/EFCore.InMemory/Extensions · high confidence

Internal infrastructure services and metrics for EF Core

The \src/EFCore/Infrastructure/Internal\ directory now contains a suite of new internal classes that support Entity Framework Core's runtime behavior. This includes \EntityFrameworkMetrics\ for exposing OpenTelemetry-compatible metrics (such as active DB contexts, query counts, and cache hits/misses), alongside internal service implementations like \ConcurrencyDetector\ for thread safety, \LazyLoader\ and \LazyLoaderFactory\ for managing lazy-loading state and memory, and helper classes such as \InternalServiceCollectionMap\ for dependency injection registration. These changes provide the underlying infrastructure for improved observability and internal service management.

src/EFCore/Infrastructure/Internal · high confidence

Internal metadata classes for columns, check constraints, and database functions

Added internal implementation classes for relational metadata, including CheckConstraint, Column, ColumnBase, ColumnMapping, and DbFunction. These classes provide the underlying data structures and logic for managing database columns, check constraints, and stored functions within the Entity Framework Core relational model.

src/EFCore.Relational/Metadata/Internal · high confidence

Internal scaffolding model and column extension helpers

Added internal extension methods to support code generation during database scaffolding. This includes \DatabaseColumnExtensions\ for identifying key/index/row-version columns and generating display names, \DatabaseForeignKeyExtensions\ for foreign key display names, \DatabaseTableExtensions\ for table display names, and \ScaffoldingModelExtensions\ for detecting many-to-many join entities, generating data annotations, and managing database/set names. These changes improve the internal infrastructure for reverse-engineering database schemas into C\# code.

src/EFCore.Design/Extensions · high confidence

Introduce ApiChief formatting and parsing logic for API baseline management

Added new files in eng/Tools/ApiChief/Format to support the ApiChief tool's role in managing and reviewing .NET API baselines. The changes introduce a C\# decompiler factory and formatter that configure the ICSharpCode.Decompiler library to generate consistent, normalized API signatures. Specifically, the formatter strips declaring types from member names, applies specific formatting rules (such as removing literal characters from numbers and simplifying type names), and parses member metadata to determine API stages (Stable, Experimental, or Obsolete) by inspecting attributes like ObsoleteAttribute and ExperimentalAttribute, while filtering out compiler-generated readonly ref struct annotations.

eng/Tools/ApiChief/Format · high confidence

Introduce ApiChief model classes for API baseline management

Added new C\# model classes (ApiMember, ApiModel, ApiStage, ApiType) in the eng/Tools/ApiChief/Model directory to support the ApiChief tool. These classes define the data structures used for generating, comparing, and reviewing API baselines, including support for JSON serialization, delta calculation, and stage tracking (Stable, Experimental, Obsolete).

eng/Tools/ApiChief/Model · high confidence

Introduce ApiChief tool for EF Core API baseline management

Added the ApiChief CLI tool in eng/Tools/ApiChief to manage and review public API surfaces for compiled assemblies. The tool provides commands to generate JSON baselines, produce human-readable API summaries, create deltas against existing baselines, and generate review artifacts. It also includes a breaking-change check that fails the build if any removed APIs are detected relative to a baseline. The tool filters out internal EF Core APIs and types in \.Internal\ namespaces.

eng/Tools/ApiChief/Commands · high confidence

Introduce CSharpRuntimeAnnotationCodeGenerator for runtime code generation

A new internal API surface has been added to Entity Framework Core to support runtime code generation. This includes the \CSharpRuntimeAnnotationCodeGenerator\ class and its associated parameters and dependencies, along with the \ICSharpRuntimeAnnotationCodeGenerator\ interface. This change enables database providers to generate C\# code at runtime, which is essential for features like precompiled queries and compiled models. The implementation handles the generation of code for annotations, type mappings, and value comparers across various model elements such as entities, properties, and keys.

src/EFCore/Design/Internal · high confidence

Introduce InMemoryDatabaseRoot for shared in-memory database state

The In-Memory database provider now uses an explicit root object (InMemoryDatabaseRoot) to share state across multiple DbContext instances. This allows multiple contexts to access the same in-memory database when they are configured with the same root instance, enabling scenarios where different contexts need to see the same in-memory data.

src/EFCore.InMemory/Storage · high confidence

Introduce JSON configuration file support for dotnet-ef CLI tools

The dotnet-ef CLI tools now support a new JSON configuration file named dotnet-ef.json, allowing users to persist default values for common command-line options such as project, startup project, context, framework, configuration, runtime, verbose, noColor, and prefixOutput. The loader searches for this file in the current directory and all parent directories, enabling global or project-level defaults that can be overridden by explicit command-line arguments.

src/dotnet-ef · high confidence

Introduce Microsoft.Data.Sqlite.Core package and foundational types

The Microsoft.Data.Sqlite.Core package is introduced, providing the core ADO.NET driver code without automatically including a SQLite native binary, allowing users to supply their own. This change adds the SqliteCacheMode enumeration to control SQLite's cache behavior, the SqliteBlob class for direct BLOB I/O operations, and extension methods on SqliteConnection for simplified command execution. Additionally, internal helper classes for type unwrapping and SQLitePCL integration are added, along with resource files for error messages and a ruleset for code analysis.

src/Microsoft.Data.Sqlite.Core · high confidence

Introduce SQL Server database migration operations

Added new migration operations for SQL Server to explicitly represent creating and dropping databases. The \SqlServerCreateDatabaseOperation\ now includes a \FileName\ property, allowing users to specify the database file name during migration, while \SqlServerDropDatabaseOperation\ handles database removal. These changes enable more granular control over database lifecycle management within EF Core migrations.

src/EFCore.SqlServer/Migrations/Operations · medium confidence

Introduce compiled model code generation for relational mappings

Added a new internal class, RelationalCSharpRuntimeAnnotationCodeGenerator, which generates C\# code for the compiled relational model. This enables the runtime to construct the relational model directly from generated code rather than relying on reflection or dynamic creation, which is a key step toward supporting NativeAOT scenarios. The implementation handles the generation of code for database functions, sequences, and table mappings, ensuring that the compiled model can be instantiated efficiently at runtime.

src/EFCore.Relational/Design/Internal · high confidence

Introduce in-memory provider convention builders

Added new classes to the EF Core in-memory provider to manage its specific model-building conventions. The \InMemoryConventionSetBuilder\ constructs the convention set for the in-memory database, explicitly adding the \DefiningQueryRewritingConvention\ to handle query rewriting and removing the \ForeignKeyIndexConvention\ which is not applicable to in-memory stores. This change encapsulates the in-memory provider's unique convention requirements, ensuring that defining queries are correctly rewritten for the in-memory context.

src/EFCore.InMemory/Metadata/Conventions · high confidence

Introduce new scaffolding metadata classes for reverse engineering

The reverse engineering (scaffolding) subsystem now uses a new set of lightweight metadata classes to represent database objects. A new \DatabaseModel\ class serves as the root, containing collections of \DatabaseTable\, \DatabaseSequence\, and \DatabaseView\ objects. Each \DatabaseTable\ now exposes its \Columns\, \Indexes\, \ForeignKeys\, \Triggers\, and \UniqueConstraints\ via dedicated metadata classes (\DatabaseColumn\, \DatabaseIndex\, \DatabaseForeignKey\, \DatabaseTrigger\, \DatabaseUniqueConstraint\), providing a structured model for database schema elements during scaffolding.

src/EFCore.Relational/Scaffolding/Metadata · high confidence

Introduce precompiled query generation infrastructure

Added new internal APIs and classes in the EF Core design-time services to support precompiled queries. This includes the \IPrecompiledQueryCodeGenerator\ interface and its \PrecompiledQueryCodeGenerator\ implementation, along with a selector and translator classes (\CSharpToLinqTranslator\, \LinqToCSharpSyntaxTranslator\, \RuntimeModelLinqToCSharpSyntaxTranslator\) that convert user code into LINQ expression trees and then back to C\# syntax. A \QueryLocator\ is also introduced to identify EF LINQ queries within the user's compilation.

src/EFCore.Design/Query · high confidence

Introduced temporary value generators for binary, DateTime, DateTimeOffset, and string types

Added new internal value generators for temporary binary, DateTime, DateTimeOffset, and string types. These classes implement the ValueGenerator interface to provide temporary values during entity creation, ensuring that the corresponding properties are marked as generating temporary values. This change supports the internal infrastructure for handling temporary values in Entity Framework Core.

src/EFCore.Relational/ValueGeneration/Internal · high confidence

Introduces internal proxy infrastructure for lazy-loading and change-tracking

The EFCore.Proxies package now includes a new internal API surface for generating and managing entity proxies. This includes the \IProxyFactory\ interface and \ProxyFactory\ implementation for creating lazy-loading and change-tracking proxies, along with interceptors (\LazyLoadingInterceptor\, \PropertyChangedInterceptor\, \PropertyChangingInterceptor\) that handle property access and change notifications. The change also adds \ProxiesOptionsExtension\ to configure proxy behavior (lazy-loading, change-tracking, and equality checking) and conventions (\ProxyBindingRewriter\, \ProxyChangeTrackingConvention\) that apply these settings to the model. These components work together to enable dynamic proxy generation for entities, allowing for automatic lazy-loading of navigation properties and tracking of property changes.

src/EFCore.Proxies/Proxies · high confidence

MSBuild integration for EF Core compiled model and precompiled queries generation

The Entity Framework Core MSBuild tasks are now integrated into the build process to automatically generate the compiled model and precompiled queries. By referencing the \Microsoft.EntityFrameworkCore.Tasks\ package, developers can control when code generation occurs (during build or publish) using the \EFScaffoldModelStage\ and \EFPrecompileQueriesStage\ properties. This enables NativeAOT-compatible code generation and supports scenarios where the startup project differs from the project containing the DbContext.

src/EFCore.Tasks · high confidence

New JSON value reader/writer infrastructure for primitive and collection types

The \src/EFCore/Storage/Json\ directory now contains a comprehensive set of new classes that implement the \JsonValueReaderWriter\ interface for a wide range of primitive types (including \bool\, \byte\, \char\, \DateOnly\, \DateTime\, \DateTimeOffset\, \decimal\, \double\, \float\, \Guid\, \int\, \long\, \short\, \sbyte\, \string\, \TimeOnly\, \TimeSpan\, \ushort\, \uint\, \ulong\), as well as specialized readers/writers for collections of structs, nullable structs, and reference types. This introduces a unified, type-specific serialization and deserialization mechanism for JSON columns in the database, replacing previous ad-hoc handling with a consistent, reusable architecture that supports value conversion and composite reading/writing.

src/EFCore/Storage/Json · high confidence

New SQL expression types for query translation

Added new SQL expression types to the relational query pipeline, including AtTimeZoneExpression, CaseExpression, CaseWhenClause, CollateExpression, ColumnExpression, ColumnValueSetter, CrossApplyExpression, CrossJoinExpression, DeleteExpression, DistinctExpression, ExceptExpression, and ExistsExpression. These classes provide the internal SQL tree representation for features like time zone conversion, conditional logic, collation, and various join and set operations.

src/EFCore.Relational/Query/SqlExpressions, src/EFCore.Sqlite.Core/Query/Internal/SqlExpressions · high confidence

New SQLite query translators for date, time, and math operations

The SQLite provider now includes dedicated query translators for \DateOnly\, \DateTime\, \char\, \byte\[\]\, and \Math\ methods, enabling direct SQL translation of operations like \DateOnly.DayNumber\, \DateTime\ component extraction, \char.ToLower/ToUpper\, \Enumerable.Contains\ on byte arrays, and standard math functions. Additionally, aggregate methods (\Sum\, \Average\, \Min\, \Max\) now support \decimal\ types, and \DbFunctions.Random\ is translated to a SQLite random function.

src/EFCore.Sqlite.Core/Query/Internal/Translators · high confidence

New attribute to control query parameterization

A new \NotParameterizedAttribute\ has been added to the \Microsoft.EntityFrameworkCore.Query\ namespace. This attribute can be applied to custom LINQ operator parameters to signal that they should not be parameterized during query compilation.

src/EFCore.Abstractions/Query · high confidence

New attributes and enums for EF Core model configuration

The \Microsoft.EntityFrameworkCore.Abstractions\ package now includes a comprehensive set of attributes and enums to configure entity models via code attributes. New additions include \BackingFieldAttribute\ to specify backing fields, \CommentAttribute\ for database comments, \DbFunctionAttribute\ for mapping CLR methods to database functions, \DeleteBehaviorAttribute\ with the new \DeleteBehavior\ enum (including \SetDefault\/\ClientSetDefault\ for ON DELETE SET DEFAULT support), \EntityTypeConfigurationAttribute\ for generic configuration types, \IndexAttribute\ with descending sort order support, \KeylessAttribute\ for keyless entity types, \OwnedAttribute\ for owned types, \PrecisionAttribute\ for decimal precision, \PrimaryKeyAttribute\ for composite keys, and \UnicodeAttribute\ for Unicode string configuration. Additionally, \ObservableCollectionExtensions\ provides a way to convert observable collections to binding lists.

src/EFCore.Abstractions · high confidence

New builders for configuring collections of complex types and many-to-many relationships

The model-building API now includes dedicated builder classes for configuring collections of complex types and many-to-many relationships. \ComplexCollectionBuilder\ and its generic counterpart \ComplexCollectionBuilder\<TComplex\>\ allow users to configure properties of complex types stored in collections, including setting annotations and defining primitive collections. Additionally, \CollectionCollectionBuilder\ and \CollectionNavigationBuilder\ provide the fluent API for configuring many-to-many relationships, including the ability to specify a join entity type and configure the relationship sides. These new builders enable more explicit and type-safe configuration of complex type collections and many-to-many associations in the Entity Framework Core model.

src/EFCore/Metadata/Builders · high confidence

New built-in value converters for common data types

EF Core now includes built-in value converters for several common types, including boolean-to-string/zero-one, byte arrays to base64 strings, characters to single-character strings, and various date/time types to strings or binary representations. These converters provide out-of-the-box support for mapping these types to and from the database without requiring custom configuration, simplifying the setup for properties like \bool\, \char\, \DateTime\, \DateTimeOffset\, and \byte\[\]\.

src/EFCore/Storage/ValueConversion · high confidence

New code analysis rulesets for documentation, style, and FxCop/NetAnalyzers

Added new XML rule set files that configure the \DocumentationAnalyzers\ (DOC100–DOC209) and \StyleCop\ (SA1000–SA1650) analyzers, along with updated \FxCop\ and \FxCop.test\ rule sets that include \Microsoft.CodeAnalysis.NetAnalyzers\ rules (CA1000–CA5382). These files establish the baseline for code quality and documentation checks in the project.

rulesets · high confidence

New configuration options for Azure Cosmos DB connectivity and session token management

The \CosmosDbContextOptionsBuilder\ class has been introduced to expose granular configuration for Azure Cosmos DB, allowing users to set the preferred region, list of preferred regions, connection mode, HTTP client factory, web proxy, and various network timeouts (request, open TCP, idle TCP, and gateway mode limits). Additionally, a new \SessionTokenManagementMode\ enum and related extension methods (\UseSessionTokens\, \GetSessionTokens\) have been added, enabling developers to control how EF Core manages Cosmos DB session tokens with modes ranging from fully automatic to manual enforcement.

src/EFCore.Cosmos/Infrastructure · high confidence

New configuration options for complex types and collections in relational models

Developers can now configure complex types and complex collections to be stored as JSON columns in relational databases. This includes new extension methods such as ToJson, HasJsonPropertyName, and HasColumnType on ComplexPropertyBuilder, ComplexCollectionBuilder, and related builders, allowing explicit control over the JSON column name, the JSON property name mapping, and the underlying database column type. Additionally, RelationalComplexPropertyExtensions and RelationalDatabaseFacadeExtensions provide metadata access and migration management capabilities for these new configurations.

src/EFCore.Relational/Extensions · high confidence

New configuration options for transaction management and change tracking

EF Core introduces new APIs to control transaction and change-tracking behavior. Developers can now configure automatic transaction creation via the new \AutoTransactionBehavior\ enum (\WhenNeeded\, \Always\, \Never\) to balance consistency and performance. Additionally, the \ChangeTrackingStrategy\ enum allows choosing between snapshot-based detection, property change notifications (\INotifyPropertyChanged\), or hybrid approaches for more efficient change tracking.

src/EFCore · high confidence

New conventions for Cosmos DB model building

Added a suite of new conventions in the EF Core Cosmos provider to handle model building specifics for Azure Cosmos DB. This includes \CosmosAutomaticIndexingBuilder\ for configuring container indexing policies, \ContextContainerConvention\ to default container names to the context type name, and \CosmosDiscriminatorConvention\ to manage entity type discriminators. Additional conventions handle primary key discovery and partition key inclusion (\CosmosKeyDiscoveryConvention\, \CosmosPartitionKeyInPrimaryKeyConvention\), many-to-many join entity partitioning (\CosmosManyToManyJoinEntityTypeConvention\), relationship discovery (\CosmosRelationshipDiscoveryConvention\), and value generation (\CosmosValueGenerationConvention\). The \CosmosUnconstrainedForeignKeyConvention\ ensures non-owned relationships are marked as unconstrained, reflecting Cosmos DB's lack of foreign key constraints. Finally, \CosmosRuntimeModelConvention\ and \CosmosJsonIdConvention\ manage runtime model serialization and JSON ID mapping respectively.

src/EFCore.Cosmos/Metadata/Conventions · high confidence

New conventions for relational metadata and JSON mapping

The model-building pipeline now includes several new conventions in the relational layer: CheckConstraintConvention ensures check constraints on derived types are compatible with base types; DiscriminatorLengthConvention sets the maximum length for string discriminator properties; EntitySplittingConvention creates linking relationships for entity splitting; EntityTypeHierarchyMappingConvention handles TPT/TPC/TPH mapping strategies; PropertyOverridesConvention manages property overrides; RelationalColumnAttributeConvention and RelationalColumnCommentAttributeConvention map the \[Column\] and \[Comment\] attributes; RelationalDbFunctionAttributeConvention maps database functions; RelationalKeyDiscoveryConvention handles key discovery for JSON-mapped owned collections; RelationalMapToJsonConvention configures default settings for entities mapped to JSON columns; RelationalMaxIdentifierLengthConvention configures maximum identifier lengths; RelationalNavigationJsonPropertyNameAttributeConvention and RelationalPropertyJsonPropertyNameAttributeConvention map \[JsonPropertyName\] attributes; RelationalQueryFilterRewritingConvention rewrites query filters for raw SQL queries; and RelationalRuntimeModelConvention creates optimized copies of the model. These changes support advanced relational mapping features, including JSON column mapping, complex type support, and improved inheritance mapping.

src/EFCore.Relational/Metadata/Conventions · high confidence

New design-time code generation and service registration APIs

The \src/EFCore/Design\ area introduces a new set of public and internal types to support design-time experiences and database provider integration. This includes the \ICSharpHelper\ interface for generating C\# code fragments, along with supporting fragment classes like \MethodCallCodeFragment\, \NestedClosureCodeFragment\, and \AttributeCodeFragment\. Additionally, the \IDesignTimeServices\ and \IDesignTimeDbContextFactory\ interfaces are added to allow providers and applications to configure design-time services and context factories. The \EntityFrameworkDesignServicesBuilder\ provides a builder API for registering design-time services, and new attributes (\DesignTimeProviderServicesAttribute\, \DesignTimeServicesReferenceAttribute\) are introduced to identify where to find these services.

src/EFCore/Design · high confidence

New diagnostic events for Cosmos DB operations

The EF Core Cosmos provider now exposes a comprehensive set of diagnostic events for logging and tracing, including \CosmosQueryEventData\, \CosmosQueryExecutedEventData\, \CosmosReadItemEventData\, \CosmosItemCommandExecutedEventData\, \CosmosTransactionalBatchExecutedEventData\, and \AutoTransactionBehaviorEventData\. These classes provide structured data about query execution, item operations, transactional batches, and auto-transaction behavior, enabling deeper observability into the provider's internal state and performance metrics.

src/EFCore.Cosmos/Diagnostics · high confidence

New diagnostics event payload classes and logging infrastructure

The EF Core diagnostics layer has been refactored to use a new set of strongly-typed event payload classes (such as AssemblyEventData, CascadeDeleteEventData, ConcurrencyExceptionEventData, and others) that carry specific context for each diagnostic event. These payloads are dispatched via the \DiagnosticSource\ and are supported by a new \EventDefinition\ and \EventDefinitionBase\ infrastructure that manages event IDs, log levels, and warning behaviors. This change provides richer, structured data to external listeners and logging systems, enabling more precise filtering and analysis of EF Core's internal state and errors.

src/EFCore/Diagnostics · high confidence

New exception and API surface for split query concurrency and multiple parameters

The \EFCore.Relational\ package now exposes a new \DbQueryConcurrencyException\ to signal when concurrent data modifications cause split queries to fail to correlate parent and child rows, as well as a new \EF.MultipleParameters\ extension method to force collection arguments into multiple parameters within LINQ queries. Additionally, the \QuerySplittingBehavior\ enum is introduced to configure whether related collections are loaded in a single or separate queries, and a new API baseline file (\EFCore.Relational.baseline.json\) is added to track public API changes.

src/EFCore.Relational · high confidence

New extension methods for LINQ queries, DI registration, and transactions

Developers gain new extension methods for Entity Framework Core: \ToQueryString\ on \IQueryable\ to view generated SQL for debugging; \AddDbContext\ and \AddDbContextPool\ in \EntityFrameworkServiceCollectionExtensions\ to register and pool \DbContext\ instances in the DI container; \Format\ on \IReadOnlyPropertyBase\ for error message formatting; and \EnlistTransaction\/\GetEnlistedTransaction\ on \DatabaseFacade\ to manage \System.Transactions\.

src/EFCore/Extensions · high confidence

New fluent API builders for database migrations

A new set of builder classes has been introduced in the EF Core Relational migrations namespace to provide a fluent, chainable API for constructing migration operations. The \OperationBuilder\<T\>\ serves as the base for all operation builders, while \CreateTableBuilder\<T\>\ and \ColumnsBuilder\ offer specific methods to define tables, columns, foreign keys, primary keys, unique constraints, and check constraints. Additionally, \AlterOperationBuilder\<T\>\ supports annotating alter operations. These builders hide standard \System.Object\ methods to reduce API noise and support method chaining for a more intuitive migration definition experience.

src/EFCore.Relational/Migrations/Operations/Builders · high confidence

New infrastructure classes for annotations and service access

Added new classes in the EF Core infrastructure layer to support model building and metadata handling. This includes \AccessorExtensions\ to resolve services from \IInfrastructure\<IServiceProvider\>\, and new base classes \Annotatable\, \AnnotatableBase\, \ConventionAnnotatable\, and \AnnotatableBuilder\ to manage annotations and configuration sources. Also added the \Annotation\ class and \ConcurrencyDetectorCriticalSectionDisposer\ for concurrency control.

src/EFCore/Infrastructure · high confidence

New internal interceptors and diagnostics loggers for database operations

Added internal classes to aggregate and invoke interceptors for DbCommand, DbConnection, and DbTransaction, enabling plugins or diagnostics tools to hook into command creation, execution, and connection lifecycle events. Additionally, new diagnostics loggers (RelationalCommandDiagnosticsLogger, RelationalConnectionDiagnosticsLogger) were introduced to handle logging and event dispatching for these operations, improving observability and extensibility for database interactions.

src/EFCore.Relational/Diagnostics/Internal · high confidence

New internal query execution and projection classes for relational queries

The Entity Framework Core relational query pipeline now includes several new internal classes to handle query execution and projection. These include \BufferedDataReader\ for managing data reading, \FromSqlQueryRootExpression\ and \FromSqlQueryingEnumerable\ for raw SQL query roots, \GroupBySingleQueryingEnumerable\ and \GroupBySplitQueryingEnumerable\ for handling grouped queries, and \JsonProjectionInfo\ for JSON column projections. These changes support the internal mechanics of query execution, such as precompiled queries, split queries, and JSON column handling, without altering the public API surface.

src/EFCore.Relational/Query/Internal · high confidence

New internal string-based value converters for common .NET types

The Entity Framework Core storage layer introduces a suite of new internal value converters that handle serialization between string representations and various .NET types. Specifically, the diff adds converters for composite values, characters, DateOnly, DateTime, DateTimeOffset, enums, Guids, numeric types, TimeOnly, TimeSpan, and URIs. These internal classes (e.g., StringDateOnlyConverter, StringNumberConverter) provide standardized string-to-type and type-to-string conversion logic, enabling more consistent handling of these types in the database storage layer.

src/EFCore/Storage/ValueConversion/Internal · high confidence

New logging definitions and event data classes for SQLite diagnostics

The SQLite provider now exposes a new \SqliteLoggingDefinitions\ class containing event definitions for various diagnostic events (e.g., schema configuration, table rebuilds, foreign key errors). Additionally, new \TableRebuildEventData\ and \UnexpectedConnectionTypeEventData\ classes have been added to support structured logging and diagnostics for these specific SQLite operations.

src/EFCore.Sqlite.Core/Diagnostics/Internal · high confidence

New migration operation classes for database schema changes

The \src/EFCore.Relational/Migrations/Operations\ directory now contains a comprehensive set of new classes representing migration operations for creating, altering, and dropping database objects. This includes operations for tables, columns, indexes, foreign keys, unique constraints, check constraints, sequences, and data manipulation (insert/delete). Each operation class (e.g., \AddTableOperation\, \AlterColumnOperation\, \CreateIndexOperation\) encapsulates the necessary metadata and state required to generate the corresponding SQL DDL/DML statements during a migration.

src/EFCore.Relational/Migrations/Operations · high confidence

New model-building APIs for check constraints, columns, and database functions

The model-building API surface has been expanded with new builder classes and interfaces to configure database-level metadata. Developers can now use CheckConstraintBuilder to configure check constraints, ColumnBuilder and ColumnBuilder\<T\> to map properties to specific columns and set annotations, and DbFunctionBuilder/DbFunctionParameterBuilder to configure database functions, including their schema, return types, and custom SQL translations. These builders provide a fluent API for setting names, schemas, store types, and annotations, enabling more precise control over the generated database schema and function mappings.

src/EFCore.Relational/Metadata/Builders · high confidence

New model-building conventions for EF Core metadata

The EF Core metadata layer now includes a comprehensive set of new convention classes in the \src/EFCore/Metadata/Conventions\ directory. These include \AutoLoadConvention\ for automatic property loading, \BackingFieldConvention\ and \BackingFieldAttributeConvention\ for mapping backing fields, \BaseTypeDiscoveryConvention\ for inheritance hierarchies, \CascadeDeleteConvention\ for delete behavior, \ChangeTrackingStrategyConvention\ for change tracking, \ComplexPropertyDiscoveryConvention\ and \ComplexTypeAttributeConvention\ for complex types, \ConcurrencyCheckAttributeConvention\ for concurrency tokens, \ConstructorBindingConvention\ for constructor binding, and \DatabaseGeneratedAttributeConvention\ for database generation strategies. These conventions automatically configure the model based on CLR types, attributes, and heuristics, reducing the need for manual configuration.

src/EFCore/Metadata/Conventions · high confidence

New options builders for Azure SQL and Azure Synapse

EF Core now provides dedicated \DbContextOptionsBuilder\ classes for Azure SQL (\AzureSqlDbContextOptionsBuilder\) and Azure Synapse (\AzureSynapseDbContextOptionsBuilder\), each exposing \EnableRetryOnFailure\ and \UseCompatibilityLevel\ methods. These new builders, along with a shared \SqlEngineDbContextOptionsBuilder\ and its base class, allow developers to configure connection resiliency and database compatibility levels specifically for these cloud database engines.

src/EFCore.SqlServer/Infrastructure · high confidence

New proxy configuration APIs for lazy-loading and change-tracking

The \Microsoft.EntityFrameworkCore.Proxies\ package now exposes new extension methods to enable proxy support. Developers can call \UseLazyLoadingProxies()\ and \UseChangeTrackingProxies()\ on \DbContextOptionsBuilder\ to activate these features. Additionally, \LazyLoadingProxiesOptionsBuilder\ provides an \IgnoreNonVirtualNavigations()\ method to suppress exceptions for non-virtual navigations, and \ProxiesServiceCollectionExtensions.AddEntityFrameworkProxies()\ registers the required services for advanced scenarios.

src/EFCore.Proxies · high confidence

New query expression and translator interfaces for relational providers

Added new expression types, \CollectionResultExpression\ and \EnumerableExpression\, to represent collection and group-by results in the query pipeline. Introduced corresponding translator interfaces (\IAggregateMethodCallTranslator\, \IMemberTranslator\, \IMethodCallTranslator\) and their providers/plugins, enabling database providers to translate LINQ expressions into SQL. These changes provide an extensibility point for custom SQL generation and improve the internal structure of the query translation layer.

src/EFCore.Relational/Query · high confidence

New relational event data classes and interceptors for command, connection, and data reader diagnostics

The \src/EFCore.Relational/Diagnostics\ directory now includes a comprehensive set of new event data classes (e.g., \CommandEventData\, \ConnectionEventData\, \DataReaderEventData\) and corresponding interceptor base classes (\DbCommandInterceptor\, \DbConnectionInterceptor\, \DbTransactionInterceptor\). These additions provide structured diagnostic payloads and interception points for database commands, connections, and data readers, enabling deeper visibility into and control over relational database operations.

src/EFCore.Relational/Diagnostics · high confidence

New relational infrastructure classes for model building, validation, and service registration

The \src/EFCore.Relational/Infrastructure\ directory now contains a new set of classes that define the relational model's service registration, validation, and initialization. \EntityFrameworkRelationalServicesBuilder\ provides a dedicated API for database providers to register relational services with specific lifetimes. \RelationalModelValidator\ enforces relational-specific model rules, such as validating table sharing, stored procedure mappings, and JSON column configurations. \RelationalModelCustomizer\ and \RelationalModelRuntimeInitializer\ handle the construction and initialization of the relational model. Additionally, \RelationalDbContextOptionsBuilder\ exposes relational configuration options like \MaxBatchSize\ and \CommandTimeout\, while \ModelSnapshot\ serves as the base class for migration snapshots. These changes introduce new internal APIs and service registrations that underpin the relational layer's behavior.

src/EFCore.Relational/Infrastructure · high confidence

New relational metadata interfaces for columns, constraints, and functions

The relational metadata layer introduces new interfaces to represent database schema elements more explicitly. This includes IColumn, IColumnBase, and IColumnMapping to model table columns and their property mappings, as well as ICheckConstraint, IForeignKeyConstraint, and IUniqueConstraint to represent database constraints. Additionally, new interfaces for database functions (IDbFunction, IConventionDbFunction), stored procedures (IConventionStoredProcedure, IConventionStoredProcedureParameter), and sequences (IConventionSequence) are added to support model building and configuration of these database objects.

src/EFCore.Relational/Metadata · high confidence

New relational type mapping and command interfaces

The relational storage layer introduces a suite of new type mapping classes (BoolTypeMapping, ByteArrayTypeMapping, ByteTypeMapping, CharTypeMapping, DateOnlyTypeMapping, DateTimeOffsetTypeMapping, DateTimeTypeMapping, DecimalTypeMapping, DoubleTypeMapping, FloatTypeMapping, and GuidTypeMapping) to handle database type conversions. Additionally, new interfaces (IParameterNameGeneratorFactory, IRawSqlCommandBuilder, IRelationalCommand, IRelationalCommandBuilder) and a DbContextTransaction extension are added to support command building and transaction management.

src/EFCore.Relational/Storage · high confidence

New resource files for EF Core exception and logging strings

The EF Core project now includes a new \CoreStrings.resx\ file and its generated \CoreStrings.Designer.cs\ class, which centralize all exception and logging message strings for the \Microsoft.EntityFrameworkCore.Diagnostics\ namespace. This change introduces a comprehensive set of localized error messages and diagnostic strings that the framework uses to report validation errors, configuration issues, and runtime conditions to the developer. The \CoreStrings\ class exposes these messages as static properties, making them accessible for testing and debugging, while the underlying \.resx\ file serves as the single source of truth for these text resources.

src/EFCore/Properties · high confidence

New scaffolding model and code generation APIs

The scaffolding subsystem now exposes a new set of public interfaces and classes to manage model and code generation. New types include \IModelCodeGenerator\ and \IModelCodeGeneratorSelector\ for standard model scaffolding, \ICompiledModelCodeGenerator\ and \ICompiledModelCodeGeneratorSelector\ for compiled model metadata, and \ICompiledModelScaffolder\ for saving compiled models to disk. Supporting classes such as \ModelCodeGenerationOptions\, \CompiledModelCodeGenerationOptions\, \ModelReverseEngineerOptions\, \ScaffoldedModel\, \ScaffoldedFile\, and \SavedModelFiles\ are introduced to configure and represent the output of the reverse engineering and code generation processes.

src/EFCore.Design/Scaffolding · high confidence

New scaffolding services for reverse engineering and code generation

The EF Core relational library introduces new abstractions and implementations to support database reverse engineering (scaffolding). A new \IDatabaseModelFactory\ interface and \DatabaseModelFactory\ base class allow database providers to generate a \DatabaseModel\ from a connection string or \DbConnection\. Additionally, \IProviderConfigurationCodeGenerator\ and \ProviderCodeGenerator\ provide a mechanism for database providers to generate provider-specific configuration code (such as \.UseSqlServer(...)\) and context options during scaffolding. The system also supports a plugin architecture via \IProviderCodeGeneratorPlugin\, enabling third-party extensions to inject custom code fragments into the generated \DbContext\ and provider configuration. A new \DatabaseModelFactoryOptions\ class allows filtering which tables and schemas are included in the generated model.

src/EFCore.Relational/Scaffolding · high confidence

New shared utility classes for dictionary, validation, and graph operations

The src/Shared directory now includes several new internal utility classes to support core framework operations. BidirectionalDictionary provides a two-way mapping dictionary, while Check offers static methods for parameter validation (e.g., NotNull, NotEmpty). DictionaryExtensions adds helper methods like GetOrAddNew and TryGetAndRemove. EnumerableExtensions and EnumerableMethods provide LINQ-style extensions and method references. Graph and Multigraph implement graph data structures for managing vertices and edges, supporting cycle detection and traversal. Additional utilities include ExceptionExtensions for identifying critical exceptions, ExpressionExtensions for expression tree manipulation, and EFDiagnostics for analyzer IDs. These changes introduce new internal infrastructure for data structures, validation, and graph processing within the shared codebase.

src/Shared · high confidence

New value generator types and infrastructure for EF Core

EF Core introduces a new value generation architecture in the \src/EFCore/ValueGeneration\ namespace, providing a more flexible and extensible way to generate values for entity properties. This includes new concrete generators for \Guid\, \string\, \byte\[\]\, and sequential \Guid\ values, as well as a \HiLo\ generator for database-assigned numeric keys. The change also introduces a new caching mechanism (\IValueGeneratorCache\, \ValueGeneratorCache\) and a selector (\IValueGeneratorSelector\, \ValueGeneratorSelector\) to manage and retrieve these generators, allowing database providers and extensions to customize value generation behavior more granularly.

src/EFCore/ValueGeneration · high confidence

Refactor Cosmos storage layer to support new features and improve reliability

The Cosmos storage layer has been refactored to support full-text search, vector search, and transactional batches, while also improving reliability through a new execution strategy that handles transient failures and respects retry-after headers. The \ContainerProperties\ record now includes fields for vector indexes, full-text properties, and automatic indexing configuration. The \CosmosDatabaseCreator\ and \CosmosDatabaseWrapper\ have been updated to handle these new container properties and execute operations via the new \CosmosExecutionStrategy\, which ensures that transient errors are retried appropriately. Additionally, new type mappings for decimal and number projections have been introduced to handle JSON serialization more robustly.

src/EFCore.Cosmos/Storage · high confidence

Relational assembly exposes internal types and string resources for providers

The Microsoft.EntityFrameworkCore.Relational assembly now exposes several internal types—AttributeCodeFragment, MethodCallCodeFragment, NestedClosureCodeFragment, and UpdateSettersBuilder—via type forwarding, allowing database providers and extensions to access these previously internal components. Additionally, the RelationalStrings resource file and its generated Designer class have been made public, enabling providers to utilize the standardized error and logging messages defined in the Relational layer.

src/EFCore.Relational/Properties · high confidence

Runtime migration compilation and new migration design-time services

The migration design-time pipeline now compiles generated C\# migration code into an in-memory assembly at runtime via the new CSharpMigrationCompiler, which uses Roslyn to compile the migration and model snapshot into a dynamic assembly. This is supported by new interfaces (IMigrationCompiler, ICSharpMigrationOperationGenerator, ICSharpSnapshotGenerator) and their implementations (CSharpMigrationCompiler, CSharpMigrationOperationGenerator, CSharpMigrationsGenerator, CSharpSnapshotGenerator) in the EF Core design-time layer, enabling runtime compilation of migrations rather than requiring pre-compiled assemblies.

src/EFCore.Design/Migrations/Design · high confidence

SQL Server full-text search and data compression support

EF Core now supports configuring SQL Server full-text search catalog and index metadata, including new enums for change tracking modes (Auto, Manual, Off, OffNoPopulation) and data compression types (None, Row, Page). Additionally, the SQL Server retry execution strategy has been updated to allow specifying additional SQL error numbers to treat as transient, and the default maximum retry count has been increased to 6 to cover a full minute of retries.

src/EFCore.SqlServer · high confidence

SQL Server provider adds support for complex types, temporal queries, and full-text search

The SQL Server provider now supports configuring complex types with SQL Server-specific options such as sparse columns and default values. It also introduces temporal table query operators (AsOf, FromTo, Between, ContainedIn, All) for querying historical data, and adds database functions for full-text search (FreeText, Contains) and JSON operations (JsonContains). Additionally, a helper method is provided to detect if the SQL Server provider is in use.

src/EFCore.SqlServer/Extensions · high confidence

SQLite migrations now handle complex schema changes via table rebuilds

The SQLite migration generator has been refactored to support complex schema changes that require table rebuilds, such as dropping or altering columns, adding foreign keys, and renaming indices. The \SqliteMigrationsSqlGenerator\ now intercepts specific migration operations (like \DropColumnOperation\, \AlterColumnOperation\, and \AddForeignKeyOperation\) and groups them into rebuild contexts. This allows the provider to generate the necessary SQL to recreate tables with the new schema, ensuring that operations which SQLite cannot perform in-place are handled correctly during migration.

src/EFCore.Sqlite.Core/Migrations · high confidence

SQLite provider extension methods for model building and database functions

The SQLite provider now exposes a comprehensive set of extension methods for configuring the model and database context. Developers can now configure the AUTOINCREMENT feature for properties and columns via \UseAutoincrement\ on \PropertyBuilder\ and \ColumnBuilder\, and set spatial SRID values via \HasSrid\. The \DbContextOptionsBuilder\ and \DbContext.Database\ facades gain \UseSqlite\ and \IsSqlite\ helpers to simplify provider configuration and detection. Additionally, the \DbFunctions\ class gains new methods (\Glob\, \Hex\, \Unhex\, \Substr\) that map to corresponding SQLite database functions, and entity types gain the ability to configure the SQL \RETURNING\ clause via \UseSqlReturningClause\.

src/EFCore.Sqlite.Core/Extensions · high confidence

SQLite spatial support via NetTopologySuite

Added SqliteGeometryTypeMapping and SqliteNetTopologySuiteTypeMappingSourcePlugin to enable reading and writing of spatial data using the NetTopologySuite library. This allows Entity Framework Core to map NetTopologySuite geometry types (such as Point, LineString, Polygon, and their Z/M variants) to SQLite, supporting store types like GEOMETRY, POINT, and LINESTRING with corresponding CLR types.

src/EFCore.Sqlite.NTS/Storage/Internal · high confidence

Support for ad-hoc entity types and constructor binding

EF Core now supports ad-hoc entity types, allowing CLR types to be mapped to entity types dynamically at runtime without prior model building. This is enabled by the new \AdHocMapper\ service and \IAdHocMapper\ interface, which handle the creation of these temporary entity types. Additionally, the framework introduces a new \ConstructorBinding\ class and related parameter binding types (e.g., \ContextParameterBinding\, \DependencyInjectionParameterBinding\) to support constructor injection and factory method binding for entity materialization. These changes allow for more flexible entity instantiation and dependency injection during query materialization.

src/EFCore/Metadata · high confidence

Support for serializing and deserializing spatial geometry data in JSON columns

A new reader/writer implementation for spatial geometry types (NetTopologySuite Geometry) has been added to handle JSON storage. This enables Entity Framework Core to read and write spatial data as Well-Known Text (WKT) strings within JSON columns, allowing spatial types to be persisted and retrieved via JSON storage.

src/EFCore.Sqlite.NTS/Storage/Json · high confidence

Update PowerShell module manifests and scripts for EF Core tools

The Entity Framework Core Package Manager Console tools have been updated with new or revised PowerShell module manifests (EntityFrameworkCore.psd1 and EntityFrameworkCore.PS2.psd1) that explicitly list exported functions such as Add-Migration, Bundle-Migration, Drop-Database, Get-DbContext, Get-Migration, Optimize-DbContext, Remove-Migration, Scaffold-DbContext, Script-DbContext, Script-Migration, and Update-Database. The init.ps1 script was added to handle module loading and versioning for both PowerShell 2.0 and 3.0+ environments, ensuring the correct module is imported based on the PowerShell version. The README.md was added to document the available PMC commands and usage instructions.

src/EFCore.Tools · high confidence

API

New update pipeline abstractions for database providers

EF Core introduces new interfaces (IUpdateAdapter, IUpdateAdapterFactory, IUpdateEntry) and supporting classes (EquatableKeyValue, UpdateEntryExtensions) that provide a cleaner, more robust abstraction for database providers to interact with the change tracker and update pipeline. This refactoring separates provider-specific update logic from the core state manager, enabling better extensibility and debugging (via ToDebugString) while maintaining compatibility with existing provider implementations.

src/EFCore/Update · high confidence

Architecture

New convention set builder interfaces and provider-specific builder

Entity Framework Core introduces new internal infrastructure interfaces (IConventionSetBuilder, IProviderConventionSetBuilder, IConventionSetPlugin) and a ProviderConventionSetBuilder implementation to streamline how database providers and extensions customize the model building conventions. This refactoring provides a dedicated service for building provider-specific convention sets and allows non-provider extensions to modify the convention set via the plugin interface, making it easier for database providers and third-party extensions to inject or replace conventions during model creation.

src/EFCore/Metadata/Conventions/Infrastructure · high confidence

New design-time service infrastructure and abstraction layer

The EF Core design-time layer has been refactored to introduce a cleaner, more extensible architecture for tooling and scaffolding. A new \DbContextActivator\ class and \DesignTimeServiceCollectionExtensions\ provide standardized mechanisms for instantiating \DbContext\ types and registering design-time services via \IServiceCollection\. New interfaces like \IOperationReportHandler\ and \IOperationResultHandler\ decouple operation reporting from the \OperationExecutor\, which now exposes \DbContextOperations\, \DatabaseOperations\, and \MigrationsOperations\ for testing and direct invocation. Additionally, \FluentApiCodeFragment\ and \ILanguageBasedService\ are introduced to support language-specific code generation and pluralization, enabling more flexible and testable design-time workflows.

src/EFCore.Design/Design · high confidence

Refactor SQLite query pipeline into dedicated internal classes

The SQLite provider's query translation and generation logic has been reorganized into a set of new, dedicated internal classes (such as SqliteQuerySqlGenerator, SqliteQueryableMethodTranslatingExpressionVisitor, and various factory classes) to improve code structure and maintainability. This refactoring isolates SQLite-specific SQL generation, expression translation, and query compilation contexts, ensuring that the provider's behavior remains consistent with the broader Entity Framework Core architecture while keeping implementation details encapsulated.

src/EFCore.Sqlite.Core/Query/Internal · high confidence

Refactor in-memory query pipeline with new expression types and context

The in-memory database provider's query execution has been refactored to use a new set of internal expression types, including InMemoryQueryExpression, InMemoryQueryContext, and InMemoryProjectionBindingExpressionVisitor. This change introduces dedicated classes for handling projections, entity references, and query contexts, replacing previous ad-hoc implementations. Users benefit from a more robust and maintainable query translation layer, which improves the reliability of in-memory LINQ queries and supports more complex query patterns like collection projections and identity resolution.

src/EFCore.InMemory/Query · high confidence

Refactored Migrations infrastructure with new internal and public interfaces

The Migrations subsystem has been refactored to improve internal structure and extensibility. New interfaces such as IHistoryRepository, IMigrationCommandExecutor, IMigrationsAnnotationProvider, IMigrationsAssembly, IMigrationsDatabaseLock, IMigrationsIdGenerator, IMigrationsModelDiffer, IMigrationsSqlGenerator, IMigrator, and ISnapshotModelProcessor have been introduced to define the migration execution and model difference logic. The HistoryRepository and related classes now use a new HistoryRepositoryDependencies record for dependency injection, and the Migration base class exposes TargetModel and Up/Down operations more explicitly. These changes support better separation of concerns in the migration pipeline, allowing database providers to implement custom behavior through the new interfaces while maintaining backward compatibility for existing migration scripts.

src/EFCore.Relational/Migrations · high confidence

Refactored convention execution into immediate and delayed scopes

The internal convention dispatcher has been refactored to distinguish between immediate and delayed convention execution. Immediate conventions run synchronously during model building, while delayed conventions are batched and executed later. This change introduces new internal classes such as \ConventionContext\, \ConventionDispatcher\, and \MetadataTracker\ to manage this execution flow, ensuring that certain metadata changes are processed immediately while others are deferred to optimize model building performance.

src/EFCore/Metadata/Conventions/Internal · high confidence

Refactored in-memory database storage layer with new internal interfaces and implementations

The internal storage architecture for the in-memory database provider has been restructured. New interfaces such as IInMemoryDatabase, IInMemoryStore, and IInMemoryTable have been introduced to define the contract for the in-memory store, table management, and database operations. Corresponding implementations like InMemoryStore, InMemoryTable, and InMemoryDatabase have been added to provide the actual functionality. This change separates the concerns of the in-memory database, allowing for better modularity and testability of the internal storage components.

src/EFCore.InMemory/Storage/Internal · high confidence

Refactored the update pipeline with new abstraction for column and command modifications

The update pipeline in Entity Framework Core has been refactored to use new abstraction interfaces and classes for managing database modifications. This includes the introduction of \IColumnModification\ and \IModificationCommand\ interfaces, along with their implementations like \ColumnModification\ and \ModificationCommand\. These changes provide a more flexible and extensible way for database providers to handle insert, update, and delete operations, allowing for easier customization and better separation of concerns within the update execution logic.

src/EFCore.Relational/Update · high confidence

Behavioural changes

2 commits (0 fixes) modifying benchmark/EFCore.Sqlite.Benchmarks

A change to existing behaviour in benchmark/EFCore.Sqlite.Benchmarks — 2 commits, 1 file.

benchmark/EFCore.Sqlite.Benchmarks · medium confidence · unverified

Add SQLite-specific diagnostic event IDs and event data classes

The SQLite provider now exposes a dedicated set of diagnostic event IDs and corresponding event data classes (such as ConflictingValueGenerationStrategiesEventData) for logging and diagnostics. This includes validation warnings (e.g., schema or sequence configuration issues), infrastructure warnings (e.g., unexpected connection types), migration warnings (e.g., pending table rebuilds), and scaffolding events (e.g., column or table discovery). These changes enable more granular logging and diagnostic capabilities specific to SQLite operations within Entity Framework Core.

src/EFCore.Sqlite.Core/Diagnostics · high confidence

Add resource strings and assembly metadata for dotnet-ef tools

The dotnet-ef CLI tools now include a new set of internal resource strings (Resources.resx/Designer.cs) that provide descriptions for various commands and parameters, such as database updates, migrations, and context scaffolding. Additionally, AssemblyInfo.cs was added to define assembly metadata and internal visibility for testing.

src/dotnet-ef/Properties · medium confidence

Added MigrationsCodeGeneratorSelector class

A new internal class, MigrationsCodeGeneratorSelector, has been added to the EF Core design-time infrastructure. This class implements LanguageBasedSelector to manage the selection of migration code generators based on language, supporting the internal API for scaffolding and migration generation.

src/EFCore.Design/Migrations/Internal · high confidence

Added entry point for SQLite benchmarks

A new Program.cs file has been added to the SQLite benchmarks support directory, establishing the entry point for the benchmark runner. This change reorganizes the benchmark structure to allow direct execution of the EF Core SQLite benchmarks.

benchmark/EFCore.Sqlite.Benchmarks/Support · high confidence

Added internal comparers for Cosmos dictionary change tracking

Added three new internal classes to the EF Core Cosmos change tracking subsystem: NullableEqualityComparer, NullableStringDictionaryComparer, and StringDictionaryComparer. These components provide the infrastructure for comparing and hashing dictionary and nullable value types during change tracking.

src/EFCore.Cosmos/ChangeTracking · high confidence

Added internal logging definitions and extensions for the In-Memory database provider

The In-Memory database provider now exposes internal logging APIs for transaction warnings and saved changes. This change introduces \InMemoryLoggingDefinitions\ and \InMemoryLoggerExtensions\ to handle diagnostic events, allowing developers to configure logging levels for specific internal events such as \LogTransactionsNotSupported\ and \LogSavedChanges\. These additions support the broader effort to expose core and relational strings and logging APIs for providers, enabling more granular control over diagnostic output for the in-memory database scenario.

src/EFCore.InMemory/Diagnostics/Internal · medium confidence

Added localized error messages for proxy configuration

The Entity Framework Core proxies package now includes a new set of localized error messages (ProxiesStrings) that provide specific guidance when proxy creation fails. Users will see clearer, structured error messages for scenarios such as sealed entity types, non-virtual properties, or missing proxy services, helping them understand and fix configuration issues with change-tracking and lazy-loading proxies.

src/EFCore.Proxies/Properties · medium confidence

Added resource strings for SQLite NTS provider

New resource files (\.resx\, \.Designer.cs\, and \.tt\ template) were added to the \src/EFCore.Sqlite.NTS/Properties\ directory. These files define internal error messages for the SQLite NetTopologySuite integration, specifically providing user-facing messages for invalid geometry types and missing service configurations.

src/EFCore.Sqlite.NTS/Properties · high confidence

Automatic temporary value generation for database-generated columns

The relational layer now automatically generates temporary values for properties of type Guid, string, and byte\[\] when the column has a default SQL value. This ensures that these properties are populated with temporary values during the Add or Update operations, allowing the application to access the generated values before the database persists them.

src/EFCore.Relational/ValueGeneration · high confidence

Benchmark runner and output columns updated

The benchmark runner now includes memory diagnostics and operations-per-second metrics in its default configuration, and a new column is added to the output to summarize all benchmark parameters for reporting tools.

benchmark/EFCore.Benchmarks · high confidence

Cosmos DB convention set refactored into a dedicated builder class

The configuration of conventions for the Cosmos DB provider has been consolidated into a new \CosmosConventionSetBuilder\ class. This change introduces a dedicated builder that manages the creation of the \ConventionSet\ by adding, removing, and replacing specific conventions (such as \CosmosJsonIdConvention\, \CosmosPartitionKeyInPrimaryKeyConvention\, and \CosmosValueGenerationConvention\) to tailor the model generation for Cosmos DB. This refactoring isolates Cosmos-specific behavior from the base \ProviderConventionSetBuilder\, ensuring that the correct conventions are applied for entity types, relationships, and value generation in the Cosmos DB provider.

src/EFCore.Cosmos/Metadata/Conventions/Internal · high confidence

Cosmos DB design-time code generation updated to filter runtime annotations

The Entity Framework Core Cosmos provider now uses a new internal \CosmosCSharpRuntimeAnnotationCodeGenerator\ to control which annotations are included in generated code. Specifically, the generator now removes annotations related to throughput, TTL (Time To Live), and automatic indexing exceptions when generating non-runtime code, ensuring that design-time tooling does not include these runtime-specific settings in the generated output. This change is supported by a new \CosmosDesignTimeServices\ class that registers the custom code generator with the EF Core design-time infrastructure.

src/EFCore.Cosmos/Design · medium confidence

Cosmos provider error messages are consolidated into a centralized resource file

The Azure Cosmos DB provider now uses a centralized resource file (CosmosStrings) to manage all error and warning messages. This change standardizes how the provider communicates issues such as unsupported operations, configuration conflicts, and validation errors to users, ensuring consistent and maintainable error reporting across the provider.

src/EFCore.Cosmos/Properties · high confidence

Cosmos: Introduce dedicated value generators for ID and temporary number properties

The Cosmos provider now uses specific value generators for handling the 'id' property and temporary integer values. A new \IdValueGenerator\ is introduced to generate stable ID strings for entities, while \CosmosValueGeneratorSelector\ is added to route integer properties to a \TemporaryNumberValueGenerator\. This refactors how the provider assigns and manages unique identifiers and temporary values during entity operations.

src/EFCore.Cosmos/ValueGeneration · medium confidence

Enforce consistent nullability check configuration for in-memory database

The in-memory database provider now validates that the nullability check setting remains consistent across the service provider lifecycle. A new internal interface and options class enforce that the \IsNullabilityCheckEnabled\ state cannot be changed after the internal service provider is built, preventing configuration drift and ensuring reliable nullability validation.

src/EFCore.InMemory/Infrastructure/Internal · medium confidence

Exposes core exception and logging string resources for database providers

The \AbstractionsStrings\ resource file and its generated designer class have been added to the \EFCore.Abstractions\ project. This change exposes a set of core exception and logging string resources, making them publicly available for use by database providers and extensions, rather than keeping them internal to the framework.

src/EFCore.Abstractions/Properties · high confidence

In-Memory Provider Logging and Error Messages

The in-memory database provider now exposes internal logging definitions and error message resources. Users can configure logging levels for specific in-memory events, and the provider provides detailed exception messages for scenarios such as unsupported operations (e.g., defining queries, client-evaluated projections, set operations after client evaluation), concurrency token conflicts, and nullability errors.

src/EFCore.InMemory/Properties · high confidence

In-Memory provider design-time services updated

The in-memory database provider's design-time services have been refactored to register the new \InMemoryCSharpRuntimeAnnotationCodeGenerator\ as the implementation for \ICSharpRuntimeAnnotationCodeGenerator\. This change ensures that code generation for the in-memory provider is handled by the updated internal generator, which now explicitly prevents compiled models for defining queries.

src/EFCore.InMemory/Design · medium confidence

In-memory database configuration options are now exposed via a dedicated builder

The \InMemoryDbContextOptionsBuilder\ class and its \IInMemoryDbContextOptionsBuilderInfrastructure\ interface have been introduced to the \src/EFCore.InMemory/Infrastructure\ directory. This change exposes the \EnableNullChecks\ method on the in-memory options builder, allowing users to explicitly enable or disable nullability checks for all properties across all entities within the in-memory database. The builder also hides standard \System.Object\ methods to prevent accidental calls by application developers.

src/EFCore.InMemory/Infrastructure · medium confidence

Initial Guardian baseline configuration added

A new .gdnbaselines file has been introduced in the .config/guardian directory, establishing the default security baseline for the Guardian tool. This configuration sets the baseline version to 1.0.0 and includes a specific result entry with its associated signature and alternative signatures, effectively defining the initial state for security rule baselining.

.config/guardian · high confidence

Internal SQLite NTS options extension refactored to use primary constructors and nullable reference types

The internal SqliteNetTopologySuiteOptionsExtension class has been updated to use C\# 12 primary constructors and nullable reference types, and the nested ExtensionInfo class now uses a primary constructor for its extension field. This change improves code clarity and enforces null-safety in the SQLite NetTopologySuite integration, though it remains an internal API not subject to public compatibility guarantees.

src/EFCore.Sqlite.NTS/Infrastructure · medium confidence

Internal extension methods added for method info, relational commands, models, and tuples

The EF Core relational layer introduces several new internal extension methods to support infrastructure operations. MethodInfoExtensions provides a way to get a formatted display name for methods. RelationalCommandResolverExtensions adds a helper to rent and populate relational commands from a resolver. RelationalModelExtensions exposes a convenience method to ensure the relational model is initialized. TupleExtensions adds formatting helpers for table and schema tuples. These changes are internal and do not affect public APIs.

src/EFCore.Relational/Extensions/Internal · high confidence

Internal extension methods for EF Core infrastructure

New internal extension classes (DbContextExtensions, EntityTypeExtensions, ExpressionExtensions, MethodInfoExtensions, TypeBaseExtensions, TypeExtensions) have been added to the EF Core internal API surface. These provide helper methods for query translation, member access chain matching, and type reflection, supporting the internal query pipeline and model building logic.

src/EFCore/Extensions/Internal · high confidence

Internal storage types migrated to file-scoped namespaces and records

The internal storage components in the Entity Framework Core storage layer have been refactored to use file-scoped namespaces and C\# record types. This change reorganizes the \Microsoft.EntityFrameworkCore.Storage.Internal\ namespace, moving types such as \DatabaseFacadeDependencies\, \ExceptionDetector\, \ExecutionStrategyFactory\, and the JSON value reader/writer interfaces (\ICompositeJsonValueReaderWriter\, \IJsonConvertedValueReaderWriter\) into their own files. These are internal infrastructure changes that do not affect public APIs or user-facing behavior, but they improve code maintainability and align with modern C\# language features.

src/EFCore/Storage/Internal · medium confidence

Introduces internal annotation names for In-Memory provider

A new internal class, InMemoryAnnotationNames, has been added to define constants for In-Memory provider annotations, including a 'InMemory:' prefix and a 'DefiningQuery' annotation. This change supports the internal infrastructure for tracking complex property changes within the in-memory database provider.

src/EFCore.InMemory/Metadata/Internal · low confidence

New SQL Server validation and diagnostics events

Added new diagnostic event IDs and event data classes for SQL Server, including warnings for decimal keys, conflicting value generation strategies, and byte identity columns. The update also introduces a new event for vector search queries lacking the approximate index hint, disables savepoints when MARS is enabled, and adds scaffolding events for columns, foreign keys, and indexes. These changes improve logging and diagnostics for SQL Server-specific behaviors.

src/EFCore.SqlServer/Diagnostics · high confidence

New analyzers for raw SQL string usage and queryable enumeration

The EFCore.Analyzers package now includes new static analysis rules to improve code safety and performance. A new security warning (EF1003) detects the use of explicit string.Format or string.Concat within raw SQL APIs, encouraging the use of parameterized queries. Additionally, a new usage warning (EF1004) identifies calls to ToAsyncEnumerable on IQueryable sources, which can defeat the purpose of async enumeration. The analyzer also refactors the internal usage warnings and suppresses uninitialized DbSet warnings when a constructor is present.

src/EFCore.Analyzers · high confidence

New design-time error and warning messages for compiled models and migrations

The \EFCore.Design\ project introduces a new set of design-time string resources in \DesignStrings.resx\ and its generated \DesignStrings.Designer.cs\ class. These provide user-facing messages for various design-time scenarios, including failures when creating or applying migrations, invalid migration names, context assembly mismatches, and specific errors related to compiled model generation (such as unsupported query filters or custom constructor bindings). The \DesignStrings.Designer.tt\ template and \InternalsVisibleTo\/\TypeForwards\ files are also added to support this new resource structure.

src/EFCore.Design/Properties · high confidence

New internal UpdateAdapter and factory for managing entity state changes

Added new internal classes \UpdateAdapter\, \UpdateAdapterFactory\, and \InternalUpdateEntryExtensions\ in the \Microsoft.EntityFrameworkCore.Update.Internal\ namespace. The \UpdateAdapter\ implements \IUpdateAdapter\ to manage state changes, including cascading deletes, detecting changes, and creating update entries. The \UpdateAdapterFactory\ provides a way to create \IUpdateAdapter\ instances, including a standalone mode for scenarios like testing or custom state management. These changes support the internal infrastructure for handling entity state transitions and relationship updates.

src/EFCore/Update/Internal · medium confidence

New logging definitions for SQL Server diagnostics

The SqlServerLoggingDefinitions class has been introduced to define internal logging events for the SQL Server provider. This change adds specific log entries for scenarios such as decimal type keys, default decimal columns, missing columns, duplicate foreign keys, and savepoint behavior with MARS, enabling more granular diagnostic information for these conditions.

src/EFCore.SqlServer/Diagnostics/Internal · high confidence

New logging extensions for SQL Server model validation warnings

Added SqlServerLoggerExtensions.cs to centralize diagnostic logging for SQL Server-specific model validation warnings, including new methods for decimal type key/default, byte identity column, and conflicting value generation strategies, ensuring consistent warning messages are emitted during model building and scaffolding.

src/EFCore.SqlServer/Extensions/Internal · high confidence

New query pipeline and caching infrastructure

The query pipeline has been refactored with new internal types to support precompiled queries and improved caching. A new \CompiledQueryCacheKeyGenerator\ and its associated dependencies and interfaces (\ICompiledQueryCacheKeyGenerator\) manage cache keys for compiled queries. Additionally, an \EvaluatableExpressionFilter\ and its plugin system (\IEvaluatableExpressionFilter\, \IEvaluatableExpressionFilterPlugin\) control which expressions are evaluated on the client versus the server. The \ExpressionEqualityComparer\ has been updated to support enumerable values, and new expression types like \EntityQueryRootExpression\ and \GroupByShaperExpression\ have been introduced to support the new query model.

src/EFCore/Query · high confidence

Optimized SQL Server update and insert generation with new internal command classes

The SQL Server provider now uses new internal classes—SqlServerModificationCommand, SqlServerModificationCommandBatch, and SqlServerUpdateSqlGenerator—to handle update and insert operations. This refactoring introduces optimized generation of SQL statements, including support for JSON column updates via JSON\_MODIFY and JSON\_VALUE/JSON\_QUERY functions, and allows for more efficient batching of insert operations. Users benefit from improved performance and more accurate handling of JSON data types in SQL Server.

src/EFCore.SqlServer/Update · high confidence

Refactor Cosmos ID generation and metadata annotations

The internal implementation for generating Cosmos DB document IDs has been refactored into a new \JsonIdDefinition\ class and associated factory, which now explicitly handles the inclusion of discriminator values in the ID string and manages the escaping of special characters. Additionally, a new \CosmosAnnotationNames\ class has been introduced to centralize all Cosmos-specific annotation keys, and extension methods have been added to identify ordinal key properties and embedded navigations.

src/EFCore.Cosmos/Metadata/Internal · medium confidence

Refactor Cosmos query and partition key handling

The Cosmos provider's internal extension methods for handling shaped queries and partition keys have been reorganized and modernized. New static extension classes—CosmosExpressionExtensions, CosmosPropertyExtensions, CosmosResponseStreamHelper, CosmosShapedQueryExpressionExtensions, and PartitionKeyBuilderExtensions—now encapsulate logic for converting expressions to arrays, extracting array projections, handling response streams, and building partition keys with support for hierarchical keys and enum/char conversions. This refactoring improves the maintainability and correctness of the Cosmos query translation and partition key management.

src/EFCore.Cosmos/Extensions/Internal · high confidence

Refactor EF Core CLI tools with ANSI color support and structured output

The Entity Framework Core CLI tools have been refactored to improve output formatting and error handling. A new \AnsiTextWriter\ and \AnsiConsole\ classes have been introduced to support ANSI escape codes for colored console output, allowing the CLI to display colored warnings, errors, and informational messages. The \Reporter\ class now uses these utilities to prefix and colorize log messages. Additionally, a \CommandException\ and \WrappedException\ types have been added to handle and structure error reporting from the CLI, ensuring that diagnostic messages are properly routed to stderr and do not pollute stdout used for data output.

src/ef · high confidence

Refactor EF Core CLI tools with new command base classes and JSON output support

The Entity Framework Core CLI tools have been refactored to use a new command base class hierarchy (CommandBase, ContextCommandBase, ProjectCommandBase) that standardizes argument handling and enables consistent JSON output for all commands. This change introduces a --json flag to commands like 'ef migrations list', 'ef migrations remove', 'ef migrations add', 'ef dbcontext info', 'ef dbcontext list', 'ef dbcontext scaffold', and 'ef dbcontext script' to return structured data instead of plain text, facilitating integration with other tools and scripts.

src/ef/Commands · high confidence

Refactor SQL Server design-time code generation into new internal classes

The SQL Server provider's design-time services have been refactored to use new internal classes: \SqlServerAnnotationCodeGenerator\ and \SqlServerCSharpRuntimeAnnotationCodeGenerator\. These classes now handle the generation of Fluent API calls and runtime annotations for SQL Server-specific features such as identity columns, temporal tables, full-text search, and index options. The \SqlServerDesignTimeServices\ class registers these new generators, ensuring that database scaffolding and migration snapshot generation correctly reflect SQL Server metadata.

src/EFCore.SqlServer/Design · high confidence

Refactor SQL Server infrastructure to support distinct engine types and compatibility levels

The internal SQL Server options have been restructured to support distinct engine types (SQL Server, Azure SQL, and Azure Synapse) and their respective compatibility levels. The new \ISqlServerSingletonOptions\ interface and \SqlServerSingletonOptions\ class now track these settings, enabling the framework to correctly handle features like JSON functions and types based on the specific database engine and its compatibility level. This change ensures that model validation and other internal processes respect the target engine's capabilities.

src/EFCore.SqlServer/Infrastructure/Internal · medium confidence

Refactor SQL Server metadata conventions into a dedicated builder

The SQL Server provider's metadata conventions have been reorganized into a new \SqlServerConventionSetBuilder\ that assembles the specific set of conventions for SQL Server. This includes replacing generic relational conventions with SQL Server-specific implementations such as \SqlServerAutoLoadConvention\ (which prevents auto-loading of vector properties), \SqlServerIndexConvention\ (which applies filters for unique non-clustered indexes with nullable columns), \SqlServerOnDeleteConvention\ (which handles cascade delete behavior for skip navigations), and \SqlServerTemporalConvention\ (which manages temporal table settings). The builder also registers conventions for memory-optimized tables, output clauses, and value generation, ensuring that SQL Server-specific behaviors like identity columns, default constraints, and temporal history tables are correctly applied during model building.

src/EFCore.SqlServer/Metadata/Conventions · high confidence

Refactor SQL Server storage layer with new internal type mapping classes

The SQL Server storage layer has been refactored to use new, specific internal type mapping classes (such as SqlServerBoolTypeMapping, SqlServerByteArrayTypeMapping, and SqlServerConnection) that implement the ISqlServerConnection interface. This change improves the handling of parameter types, connection string modification (specifically injecting an Application Name), and SQL literal generation for various data types, ensuring more robust and consistent behavior for Entity Framework Core's SQL Server provider.

src/EFCore.SqlServer/Storage · high confidence

Refactor SQLite storage internals with dedicated type mapping classes

The SQLite provider's storage layer has been refactored to use dedicated, self-contained type mapping classes for each supported CLR type (e.g., SqliteDateOnlyTypeMapping, SqliteDecimalTypeMapping, SqliteJsonTypeMapping). This change introduces specific handling for JSON, date/time, and decimal types in SQLite, ensuring consistent SQL literal generation and improved internal architecture for the SQLite database creator and connection management.

src/EFCore.Sqlite.Core/Storage/Internal · high confidence

Refactor change tracking internals to support complex types and collections

The change tracking system has been refactored to better support complex types and collections. New internal classes such as \ArrayPropertyValues\, \ChangeDetector\, and various key factories (\CompositeDependentKeyValueFactory\, \CompositePrincipalKeyValueFactory\, \CompositeValueFactory\) have been introduced to handle the tracking of complex properties and composite keys. This includes logic for managing null complex properties, handling collections of complex types, and generating equatable keys for composite keys. These changes improve the internal handling of entity state and property changes, particularly for nested or complex data structures.

src/EFCore/ChangeTracking/Internal · high confidence

Refactor design-time service initialization and environment handling

The design-time service initialization logic has been refactored into a new \AppServiceProviderFactory\ class, which centralizes the creation of the service provider and handles setting the \ASPNETCORE\_ENVIRONMENT\ and \DOTNET\_ENVIRONMENT\ variables to 'Development' by default. This change moves the environment variable logic out of the \DbContextOperations\ and \MigrationsOperations\ classes, ensuring that design-time tools consistently apply the correct environment settings when creating \DbContext\ instances.

src/EFCore.Design/Design/Internal · high confidence

Refactor in-memory integer value generation

The in-memory database provider now uses a dedicated \InMemoryValueGenerator\ for integer properties, replacing the previous generic value generation approach. This change associates integer value generation directly with the property, ensuring that the generated values are correctly tracked and updated during in-memory operations.

src/EFCore.InMemory/ValueGeneration · medium confidence

Refactor internal DbContext infrastructure to support context pooling and factory patterns

The internal DbContext infrastructure has been refactored to support context pooling and factory patterns. New internal classes including DbContextPool, DbContextLease, DbContextFactory, and DbContextFactorySource have been introduced to manage the lifecycle and reuse of DbContext instances. The DbContextPool class now handles the caching and return of pooled contexts, while the DbContextFactory and its source provide a mechanism for creating new context instances. These changes underpin the ability to configure and manage pooled DbContexts more efficiently, reducing allocation overhead and improving performance for applications that reuse context instances.

src/EFCore/Internal · high confidence

Refactor internal migration execution and model differ into new internal classes

The internal migration infrastructure has been refactored to improve performance and maintainability. A new \MigrationCommandExecutor\ class now handles the execution of migration commands, including transaction management and isolation level support. The \MigrationsModelDiffer\ has been restructured to use a \DiffContext\ for tracking state during model comparison. Additionally, \Migrator\ and \MigrationsAssembly\ have been updated to work with these new internal abstractions, enabling better separation of concerns in the migration pipeline.

src/EFCore.Relational/Migrations/Internal · high confidence

Refactor internal parameter handling and add named connection string resolution

The internal storage layer in \src/EFCore.Relational/Storage/Internal\ has been refactored to support named connection strings and improve parameter management. A new \INamedConnectionStringResolver\ interface and its implementation allow resolving connection strings from \IConfiguration\ when a named connection string is provided. Additionally, the codebase introduces several new internal classes to handle relational parameters more effectively: \RelationalParameterBase\ as an abstract base, along with concrete implementations like \CompositeRelationalParameter\, \RawRelationalParameter\, and \TypeMappedRelationalParameter\. A \NullTypeMapping\ is also added to handle null type mappings. These changes streamline how parameters are added to commands and how connection strings are resolved, providing a more robust internal foundation for database interactions.

src/EFCore.Relational/Storage/Internal · high confidence

Refactored Cosmos DB configuration options into dedicated internal classes

The internal configuration for the Cosmos DB provider has been reorganized into new classes: \CosmosOptionsExtension\, \CosmosSingletonOptions\, \CosmosModelRuntimeInitializer\, \CosmosModelRuntimeInitializerDependencies\, and \CosmosModelValidator\. This change consolidates connection details (endpoint, key, connection string, token credential), runtime settings (region, preferred regions, connection mode, timeouts, proxy, bulk execution), and model validation logic into these specific internal components, improving the structure of how EF Core manages Cosmos DB state and initialization.

src/EFCore.Cosmos/Infrastructure/Internal · high confidence

Refactored EF Core diagnostics and logging infrastructure

The Entity Framework Core logging and interception subsystem has been refactored to improve performance and extensibility. A new \DiagnosticsLogger\ class now serves as the central hub for dispatching events to both \DiagnosticSource\ and \ILogger\ backends, while a new \Interceptors\ class manages the aggregation and execution of registered interceptors. The change introduces dedicated aggregator classes for each interceptor type (e.g., \SaveChangesInterceptorAggregator\, \MaterializationInterceptorAggregator\) to streamline how multiple interceptors are chained and invoked. Additionally, logging behavior has been optimized by suppressing checks in hot query paths and introducing a \ScopedLoggerFactory\ to manage logger lifetimes more effectively.

src/EFCore/Diagnostics/Internal · high confidence

Refactored SQL Server HiLo value generation internals

The internal implementation for SQL Server HiLo value generation has been restructured. New internal interfaces and classes (including \ISqlServerSequenceValueGeneratorFactory\, \ISqlServerValueGeneratorCache\, \SqlServerSequenceHiLoValueGenerator\, and \SqlServerValueGeneratorSelector\) have been introduced to manage sequence-based identity and value generation. This change isolates the SQL Server-specific logic for generating values from sequences, ensuring that the selector properly routes properties marked with \SqlServerValueGenerationStrategy.SequenceHiLo\ to the new factory and cache mechanisms.

src/EFCore.SqlServer/ValueGeneration · high confidence

Refactored SQL Server migration SQL generation

The SQL Server migration SQL generator has been refactored to use a command batch preparer for generating commands, allowing for more flexible handling of SQL batches and idempotent script generation. This change improves how migration scripts are constructed, particularly for operations like adding columns with comments or handling identity columns, ensuring that generated SQL is correctly batched and terminated. The refactoring also introduces better support for idempotent scripts by wrapping certain operations in EXEC() calls when necessary, and ensures that identity constraints are handled correctly to avoid conflicts with default constraints.

src/EFCore.SqlServer/Migrations · medium confidence

Refactored design-time code generation and service registration

The design-time architecture for relational database providers has been refactored to improve extensibility and consistency. A new \AnnotationCodeGenerator\ class and its associated dependencies (\AnnotationCodeGeneratorDependencies\) have been introduced to centralize the logic for generating Fluent API calls and filtering annotations. This change also introduces the \EntityFrameworkRelationalDesignServicesBuilder\ to standardize how relational services are registered in the dependency injection container, and exposes the \IOperationReporter\ interface for consistent reporting of design-time messages. Database providers should update their implementations to use the new \IAnnotationCodeGenerator\ interface and register their services via the new builder.

src/EFCore.Relational/Design · high confidence

Refactored storage infrastructure with new parameter objects and dependency containers

The storage layer has been refactored to improve extensibility and internal structure. A new \CoreTypeMappingParameters\ record struct bundles type mapping configuration (converter, comparers, generators) to simplify object creation and composition. The \Database\, \DatabaseProvider\, and \ExecutionStrategy\ classes now rely on dedicated dependency container records (\DatabaseDependencies\, \DatabaseProviderDependencies\, \ExecutionStrategyDependencies\) to manage service dependencies, replacing previous patterns. Additionally, \ExecutionResult\<T\>\ was introduced to encapsulate operation success states and results, and \ExecutionStrategy\ now supports configurable retry counts and delays for connection resiliency.

src/EFCore/Storage · high confidence

Refactored update pipeline with new internal classes for command batching and value handling

The update pipeline's internal implementation has been refactored to improve performance and maintainability. A new \BatchExecutor\ class now handles the execution of modification command batches, including transaction and savepoint management. The \CommandBatchPreparer\ has been updated to use a new \CommandBatchPreparerDependencies\ record for dependency injection, and a \ColumnAccessors\ class with a corresponding factory has been introduced to efficiently retrieve current and original column values. Additionally, new factory classes (\CompositeRowForeignKeyValueFactory\, \CompositeRowIndexValueFactory\, \CompositeRowKeyValueFactory\, and \CompositeRowValueFactory\) have been added to handle composite key and index value generation, supporting more complex update scenarios.

src/EFCore.Relational/Update/Internal · high confidence

Refactors CLR accessor infrastructure for collections and indexed properties

The internal CLR accessor implementation for collections and indexed properties has been refactored to use a new \ClrAccessorFactory\ base class and a dedicated \ClrCollectionAccessor\ hierarchy. This change introduces \ClrAccessorFactory\<TAccessor\>\ to handle the creation of accessor instances via reflection and generics, and replaces the previous \ClrCollectionAccessor\ with a more robust, generic \ClrCollectionAccessor\<TStructural, TCollection, TElement\>\ that supports both standard and indexed collection access. This refactoring improves the internal consistency of the metadata layer and supports the broader change-tracking and model-building improvements in this release.

src/EFCore/Metadata/Internal · high confidence

Relational convention set builder refactored into dedicated classes

The relational database provider's convention set is now constructed via a new \RelationalConventionSetBuilder\ class and its associated dependencies (\RelationalConventionSetBuilderDependencies\). This change encapsulates the registration of relational-specific conventions (such as table/column attributes, stored procedures, and check constraints) and replaces core conventions with relational-specific implementations (e.g., \RelationalValueGenerationConvention\). This provides a cleaner separation between core and relational model building logic, making it easier for database providers to extend or customize the convention set.

src/EFCore.Relational/Metadata/Conventions/Infrastructure, src/EFCore.Sqlite.Core/Metadata/Conventions · high confidence

Reorganized SQL Server benchmark tests

The SQL Server-specific benchmark tests have been reorganized into new, dedicated files for each test category (ChangeTracker, Initialization, Query, UpdatePipeline) and model classes have been updated to use C\# primary constructors. This restructuring improves the organization of the benchmark suite, making it easier to locate and run specific performance tests for SQL Server scenarios.

benchmark/EFCore.SqlServer.Benchmarks · medium confidence

SQL Server index and key compatibility validation and metadata support

The SQL Server provider now enforces stricter compatibility checks for duplicate indexes and keys, validating that clustered status, fill factor, sort in temp DB, and data compression match to prevent ambiguous schema states. Additionally, internal metadata constants and extension methods have been added to support index options (fill factor, sort in temp DB, data compression) and key clustering, enabling more precise control over SQL Server index generation and validation.

src/EFCore.SqlServer/Metadata/Internal · high confidence

SQL Server migration lock and history repository refactored

The SQL Server provider now uses a dedicated \SqlServerMigrationDatabaseLock\ class to manage database locks during migrations, ensuring the lock is acquired and released within a transaction. Additionally, the \SqlServerHistoryRepository\ has been updated to filter out full-text catalog operations when creating the history table, preventing premature creation of database-level annotations that can cause migration failures. The \SqlServerMigrationsAnnotationProvider\ has also been refactored to handle temporal table and full-text search annotations more explicitly.

src/EFCore.SqlServer/Migrations/Internal · medium confidence

SQL Server query translation overhaul and new SQL features

The SQL Server query translation pipeline has been significantly refactored and expanded. A new \SearchConditionConverter\ handles boolean-to-bit conversions for search conditions, while \SqlServerAggregateFunctionExpression\ and \SqlServerAggregateOverSubqueryPostprocessor\ improve how aggregate functions and subqueries are processed. The update also introduces support for SQL Server vector search, JSON column handling (including \JsonContains\ and \JsonExists\), and various fixes for \OPENJSON\ and \JSON\_VALUE\ translations. Additionally, the query cache key generation now accounts for MARS settings, and the \SqlServerEvaluatableExpressionFilter\ is updated to handle SQL Server-specific function evaluations.

src/EFCore.SqlServer/Query/Internal · high confidence

SQL Server reverse engineering (scaffolding) refactored and modernized

The SQL Server reverse engineering (scaffolding) implementation has been refactored to modernize the codebase and improve reliability. The \SqlServerDatabaseModelFactory\ has been rewritten to use \Microsoft.Data.SqlClient\ and query the \sys\ system views directly, enabling support for new features like SQL Server vector indexes, full-text search catalogs, and temporal tables. The code generator has been updated to use the \UseSqlServer\ extension method, and the type mapper now explicitly scaffolds precision for decimal columns. Additionally, the scaffolding process now correctly handles default constraints, hidden columns, and collation settings, while ignoring hypothetical and column store indexes.

src/EFCore.SqlServer/Scaffolding · medium confidence

SQLite migration lock implementation

The SQLite provider now implements its own \SqliteHistoryRepository\ and \SqliteMigrationDatabaseLock\ classes to manage database locking during migrations. This introduces a dedicated lock table (\\_\_EFMigrationsLock\) and a retry-based acquisition mechanism to ensure exclusive access to the database while applying migrations, replacing the previous generic or inherited locking behavior.

src/EFCore.Sqlite.Core/Migrations/Internal · high confidence

SQLite model validation and options configuration

The SQLite provider now includes a dedicated model validator (SqliteModelValidator) that enforces provider-specific constraints: it warns when a schema is configured, throws an error if stored procedures are used, validates that duplicate column names have matching spatial reference IDs, warns about composite primary keys with value generation, and ensures consistent use of the SQL RETURNING/OUTPUT clause across shared table types. Additionally, SqliteOptionsExtension now exposes a LoadSpatialite option to enable spatial data support via NTS and SpatiaLite.

src/EFCore.Sqlite.Core/Infrastructure/Internal · high confidence

SQLite provider exposes internal string and logging resources

The SQLite provider now exposes its internal string resources and logging definitions via the new \SqliteStrings\ and \SqliteResources\ classes in \src/EFCore.Sqlite.Core/Properties\. This change adds the \SqliteStrings.Designer.cs\ code-behind, the \SqliteStrings.resx\ resource file, and the \SqliteStrings.Designer.tt\ template, enabling consistent error messages and structured logging for SQLite-specific scenarios such as unsupported aggregate operators, missing table references, and conflicting value generation strategies.

src/EFCore.Sqlite.Core/Properties · high confidence

SQLite provider introduces internal annotation names and provider for metadata handling

The SQLite provider now includes a dedicated \SqliteAnnotationNames\ class and a \SqliteAnnotationProvider\ implementation. This change centralizes SQLite-specific annotation keys (such as \Sqlite:Autoincrement\, \Sqlite:Srid\, and \Sqlite:InitSpatialMetaData\) and implements logic to attach spatial metadata annotations when spatialite types are detected, as well as handling auto-increment and SRID properties for columns.

src/EFCore.Sqlite.Core/Metadata/Internal · high confidence

SQLite provider updates for JSON and RETURNING clause support

The SQLite provider now supports the SQL \RETURNING\ clause for \INSERT\, \UPDATE\, and \DELETE\ operations, automatically falling back to a \SELECT\ for older SQLite versions. Additionally, JSON property updates are optimized to use SQLite's native \json()\ and \json\_set()\ functions, with specific handling to ensure boolean values are correctly serialized as \true\/\false\ strings within JSON documents.

src/EFCore.Sqlite.Core/Update · high confidence

SQLite reverse engineering now supports Half, TimeOnly, and unsigned integer types

The SQLite scaffolding implementation has been updated to recognize and map a broader set of .NET types during reverse engineering. Specifically, the \SqliteDatabaseModelFactory\ now maps the \Half\ type, \TimeOnly\ type, and various unsigned integer types (uint, ulong, ushort, byte, short, sbyte) to their corresponding CLR types. This ensures that when generating code from an existing SQLite database, the resulting C\# models will use these more specific .NET types where appropriate, improving type safety and reducing the need for manual conversion.

src/EFCore.Sqlite.Core/Scaffolding · high confidence

SQLite scaffolding now generates code for AUTOINCREMENT identity columns

The SQLite provider now includes a dedicated code generator (SqliteAnnotationCodeGenerator) that explicitly handles the Autoincrement value strategy during scaffolding. This ensures that when reverse-engineering a SQLite database, the generated C\# code correctly includes the Fluent API calls to preserve AUTOINCREMENT behavior on integer primary keys, rather than relying on fallback logic or omitting the configuration.

src/EFCore.Sqlite.Core/Design · high confidence

Scaffolding annotations are now defined in a dedicated internal class

The constants for scaffolding annotations, such as DbSetName, DatabaseName, ConcurrencyToken, ClrType, and ConnectionString, have been consolidated into a new internal class named ScaffoldingAnnotationNames. This change organizes the internal API surface used by the code generation and scaffolding infrastructure, ensuring that these internal identifiers are centrally defined and documented.

src/EFCore.Design/Metadata · high confidence

Scaffolding code generation refactored to use T4 templates

The C\# code generation for reverse engineering (Scaffolding) has been refactored to use T4 templates (.tt files) instead of the previous approach. This change introduces new generator classes (CSharpDbContextGenerator, CSharpEntityTypeGenerator, CSharpModelGenerator, etc.) that produce scaffolded C\# files. The templates handle the generation of DbContext, entity classes, and runtime model code, allowing for more flexible and maintainable code generation logic. Users will see the same scaffolded output, but the internal implementation has been modernized to use the Text Template Transformation framework.

src/EFCore.Design/Scaffolding/Internal · high confidence

Scaffolding type mapping refactored to support explicit precision scaffolding

The internal scaffolding infrastructure for Entity Framework Core has been refactored to introduce a new \IScaffoldingTypeMapper\ interface and \TypeScaffoldingInfo\ data class. This change enables the scaffolding process to explicitly preserve \HasPrecision\ and \HasScale\ metadata for decimal columns (specifically targeting SQL Server), ensuring that these precision and scale values are consistently included in the generated code rather than being inferred or omitted.

src/EFCore.Relational/Scaffolding/Internal · medium confidence

Update target framework and add documentation

The Microsoft.Data.Sqlite package now targets only .NET 10.0, dropping support for netstandard2.0. Additionally, a README.md file was added to provide installation and usage instructions, and a placeholder file was added for the new target framework.

src/Microsoft.Data.Sqlite · high confidence

Updated CLI tooling resource strings and assembly metadata

The Entity Framework Core CLI tools have updated their internal resource strings and assembly metadata. This includes new or modified help text for commands such as \database drop\, \database update\, and \dbcontext info\, as well as updated descriptions for parameters like \--context\, \--connection\, and \--offline\. The \AssemblyInfo.cs\ file has been added to configure \InternalsVisibleTo\ for testing, and the \Resources.Designer.cs\ file has been regenerated to reflect the latest set of user-facing messages and parameter descriptions.

src/ef/Properties · medium confidence

Updated SQL Server error and warning messages

The resource files for SQL Server-specific error and warning messages have been updated. This includes new messages for duplicate column and index configuration mismatches (such as identity, sequence, sparseness, clustered, data compression, fill factor, included columns, online, and sort in tempdb settings), as well as improved messages for full-text index validation, ExecuteUpdate limitations on older SQL Server versions, and compatibility level warnings for JSON arrays.

src/EFCore.SqlServer/Properties · high confidence

Updated analyzer resource strings for SQL injection and async enumeration warnings

The localized resource files for the EF Core analyzers have been updated to include new warning messages. Developers will now see specific guidance about the risk of SQL injection when using interpolated strings or string concatenation in raw SQL methods, as well as a warning about using ToAsyncEnumerable on IQueryable. The resources also include messages for internal API usage and uninitialized DbSet properties.

src/EFCore.Analyzers/Properties · high confidence

Updated benchmark context classes to use C\# primary constructors

The benchmark models for AdventureWorks and Orders have been refactored to use C\# primary constructors. This change simplifies the definition of the SQLite context classes (AdventureWorksSqliteContext, AdventureWorksPoolableSqliteContext, OrdersSqliteContext) and their associated fixtures, aligning the benchmark code with modern C\# language features.

benchmark/EFCore.Sqlite.Benchmarks/Models · medium confidence

Test coverage

Added SQLite benchmark tests for EF Core performance tracking; Added SQLite initialization benchmark tests; Added benchmarks for EF Core update pipeline operations; Added infrastructure for trimming and NativeAOT test apps; Added new benchmark tests for EF Core query and change tracking; Expanded test coverage for EF Core query and state management.

Dependencies

Centralized package version management and modernized project structure

The project has adopted central package version management via new Directory.Packages.props files, which define the versions for all NuGet packages in a single location. This change simplifies dependency updates and ensures consistency across the solution. Additionally, the project files have been modernized with implicit usings, file-scoped namespaces, and updated target frameworks, improving maintainability and build performance.

(dependencies) · high confidence

Update .NET runtime and SDK dependencies

The .NET runtime and SDK dependencies have been updated to the latest versions, including Microsoft.NETCore.App.Runtime.win-x64 and Microsoft.NETCore.App.Internal, ensuring the project uses the most recent runtime and SDK builds for improved stability and security.

(repo-wide) · low confidence

Updated .NET runtime and framework dependencies

Updated dependencies from the dotnet/runtime, dotnet/arcade, and aspnet/Extensions repositories, incorporating the latest servicing builds and coherency updates for packages such as Microsoft.NETCore.App.Runtime.win-x64, Microsoft.Extensions.Logging, and various Microsoft.Extensions.\* packages. These updates ensure the project uses the most recent stable and servicing versions of the .NET runtime and related libraries.

eng · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 62.

Lenses

  • Architecture 91
  • Maturity 55
  • Readiness 74
  • Security 59

Changes since last survey

  • 300 commits — 263 feature/other, 37 fixes

By area

  • (root) — 58 commits
  • (repo) — 50 commits
  • src/EFCore — 32 commits
  • src/EFCore.Relational — 24 commits
  • eng/Versions.props — 23 commits
  • test/EFCore.SqlServer.FunctionalTests — 16 commits
  • src/EFCore.SqlServer — 11 commits
  • test/Directory.Packages.props — 11 commits
  • .github/workflows — 10 commits
  • eng/common — 10 commits
  • test/EFCore.Cosmos.FunctionalTests — 10 commits
  • test/EFCore.Specification.Tests — 5 commits
  • src/EFCore.Cosmos — 4 commits
  • src/EFCore.Design — 4 commits
  • src/EFCore.Sqlite.Core — 4 commits
  • test/EFCore.Relational.Specification.Tests — 4 commits
  • .github/CODEOWNERS — 3 commits
  • src/Microsoft.Data.Sqlite.Core — 3 commits
  • .github/dependabot.yml — 2 commits
  • src/EFCore.Analyzers — 2 commits

Notable commits

  • fix: Fix AssertAllMethodsOverridden for XUnit V3 Fact/Theory (#38570)
  • fix: Fix ConditionalFact, InitializeAsync, CreateContext and TestEnvironment in AdHocJson tests
  • fix: Fix Cosmos tests when running against a real endpoint (#38710)
  • fix: Fix DetectChanges throwing when nullable nested complex property with nested collection is set to null (#38667)
  • fix: Fix ExecuteUpdate returning -1 on open connections by setting NOCOUNT OFF (#37827)
  • fix: Fix FK diff matching across same table names in different schemas (#38582)
  • fix: Fix FK to entity-split principal referencing wrong (fragment) table (#38586)
  • fix: Fix GroupBy().Select(entity) followed by a second projection (#38436)
  • fix: Fix GroupBy.Select EmptyProjectionMember (#38140)
  • fix: Fix JsonReaderData buffer refill to respect valid bytes on partial stream reads (#38666)
  • fix: Fix NativeAOT publish: rebuild RID-specific assembly with generated sources (#38322)
  • fix: Fix NullReferenceException for mistyped default values on non-string columns in migrations (#38399)
  • fix: Fix NullReferenceException materializing JSON owned collections with nested primitive collections under lazy-loading proxies (#38473)
  • fix: Fix OPENJSON AS JSON failure on Azure SQL when column type is json at compat level 170 (#38665)
  • fix: Fix OriginalValues.ToObject for added complex collections (#38493)
  • fix: Fix SQL Server 2025 test assertion: use nvarchar(max) in OPENJSON WITH for json column type
  • fix: Fix SQL Server password in copilot-setup-steps.yml (#38445)
  • fix: Fix alter column type JSON to nVarchar (#38464)
  • fix: Fix compiled-model CreateRelationalModel() failure when an owned entity shares its owner's table (#38428)
  • fix: Fix complex property projection for entity splitting mappings (#38592)
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

dotnet/efcore was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 5 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit dbf9771522148d61a2467854921bd5dc6f6e6916 — the exact code this score is about.
  • Scored under rubric-2026.08.19 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer latest.