Features
- Query: Anonymous type projections should use member names as column aliases wherever possible (#8204)
- Migrations: Specify NULL columns explicitly in DDL (#8146)
- Query: Lift subquery with nested orderby (#8054)
- Query: Implement "Like" function in core (#8004)
- Query: Prevent client evaluation when subquery returning entity is compared to null (#7915)
- Query: Improve SQL for queries with left join that generate subqueries due to discriminator predicate (#7689)
- Infrastructure: Allow custom SQLite builds (winsqlite3, SQLCipher, etc.) (#7667)
- Query: Remove redundant compilations of subquery models when processing MainFromClause, AdditionalFromClause and Join/GroupJoin clauses (#7647)
- Query: Flatten out subquery models at query optimizer (#7613)
- Query: Apply optimizations to composite predicates in all parts of the query (#7608)
- Query: Add missing translators for Math functions in SqlServer provider (#7601)
- Query: Prevent client evaluation if query modifiers precede condition (#7560)
- Infrastructure: Avoid reference counting for open and close in SQLite provider (#7527)
- DbContext: Require name for "persistent" in-memory database and add explicit API for creating transient database (#7482)
- Infrastructure: Add parameter objects and service rewriting code to avoid breaking base class D.I. constructors in patch/point releases (#7465)
- Infrastructure: Allow only one database provider per service provider (#7457)
- Query: Improved performance for String.StartsWith() filters (#7429)
- Migrations: CLI Tools: Honor ASPNETCORE_ENVIRONMENT (#7353)
- Query: Translate Distinct to SQL when applied after custom projection (#7234)
- Infrastructure: Improve experiece for filtering log data (#7217)
- Model configuration: Set ValueGenerated for store-generated properties using a convention (#7205)
- Query: Translate Average to server side (#7190)
- Migrations: Make generated code play well with StyleCop (#7189)
- Query: Translate querys with filter on sub-query to a single SQL statement (#7122)
- Infrastructure: Trace when query is done. This is needed in order to get SelectRows statistics. (#7105)
- Query: Prevent client evaluation when using certain result operators in complex query (#7096)
- Model configuration: Make filtered indexes play nice with other providers (#7087)
- Infrastructure: Improve Exception message: Unable to create or track an entity of type 'abc' because it has a null primary or alternate key value. (#7001)
- Infrastructure: Make RelationalFullAnnotationNames public (#6993)
- DbContext: Stop special-casing the root entity on Attach (#6990)
- DbContext: Throw on AddDbContext with options lambda when context has no options ctor (#6963)
- Infrastructure: Convert more services to be singletons (#6924)
- Performance: Implement DbContext pooling for high scale scenarios (#6923)
- Query: Allow providers to replace and extend SqlTranslatingExpressionVisitor (#6888)
- Query: Avoid adding unnecessary sort columns in query with projection and optional navigation properties (#6861)
- Model configuration: Ability to override IS NOT NULL clauses of an index (#6794)
- Query: Translate DateTimeOffset.Date (#6778)
- Migrations: Handle GO statements in SQL Server (#6747)
- Query: Simplify aliases for complex projection if being used in order by clause (#6703)
- Reverse engineering: Add IsConfigured check to avoid using hard-coded connection when previously configured (#6686)
- SaveChanges: Database.SetCommandTimeout overload that accepts a TimeSpan argument (#6614)
- Query: Prevent client evaluation and N+1 queries when calling result operators before other operators (#6611)
- Query: Issue warning for queries with paging operations (First, Take, Skip) without OrderBy (#6576)
- Query: Throw better exception when reading incorrect data for relational providers (#6471)
- Query: Ix-Async dependency updated to 3.1 (#6328)
- Query: Using Include and referencing a navigation property will not result in repeated joins (#6206)
- Migrations: SQL Server Filtered Indexes (#5817)
- Query: Model-level filters for queries (#5774)
- Reverse Engineering: Enable pluralization/singularization when scaffolding a model from a database (#3060)
- Query: Provide EF.Functions to define methods that correspond to standard SQL operations (#2850)
- Model configuration: Entity type configuration can be factored into a class (#2805)
Bugs Fixed
- Migrations: Exception thrown with model containing TPH in certain cases: The entity type should derive from to reflect the hierarchy of the corresponding CLR types. (#8423)
- DbContext: Owned entity types are incorrectly identified as tracked when clr types contain Equals implementation (#8284)
- Query: The generated identifiers in multi level queries are too long for SQLServer (#8255)
- Query: projecting stringColumn.Length may cause invalid cast exception, if the stringColumn is of type (n)varchar(max) on SqlServer (#8176)
- EntityType marked with NotMapped is still discovered by Conventions (#8151)
- Query: ProjectionShaper ignores the offset while Shaping (#8095)
- Query: Order by with condition evaluating to true/false produces invalid SQL (#8092)
- Reverse engineering: Scaffold-DbContext creates invalid code for default constraints with line breaks (#8077)
- Query: Navigation rewrite: EF.Property navigations not rewritten correctly (#8068)
- Query: The binary operator Equal is not defined for the types 'System.Nullable`1[System.Boolean]' and 'System.Boolean'. (#8065)
- Query: Make our reflection info selection logic deterministic (#8060)
- Query: QuerySourceTracingExpressionVisitor doesn't always prune EF.Property expressions (#8053)
- Query: Inner Join not generated when using custom projections or wrong alias when omitting custom projections (#8043)
- Query: SqlServerStringReplaceTranslator fails with Sequence contains more than one matching element on the latest runtime (#8021)
- Query: Unable to cast object of type when using Include in projection (#8005)
- Reverse engineering: Scaffold-DbContext can generate IsRequired() on nullable unique column if it is also an FK (#7956)
- Reverse engineering: Unique Index interpreted incorrectly to give one-to-one instead of one-to-many relationship (#7938)
- Query: AsNoTracking/AsTracking methods on Non-EF Queryable providers throws InvalidOperationException (#7937)
- Infrastructure: DatabaseName is only used by tooling and shouldn't be public runtime API (#7936)
- Query: Contains method on client list of nullable guid/int fails to translate to server (#7922)
- Reverse engineering: Scaffold-DbContext can result in invalid SQL for computed column constraint (#7918)
- Query: Navigation filter + navigation group by + order by grouping key throws exception (#7904)
- Query: Joined query isn't correctly translated (#7888)
- Query: Stop producing N+1 queries for cases where single element subquery is projected inside a DTO (#7882)
- Query: Query: Query containing subquery with annonymous type fails to translate to server (#7844)
- Query: Errorneous IS NULL check in SQL causing repetitive null checks or invalid SQL with coalesce (#7784)
- Query: DateTime.Add* functions throw exception when argument is larger than int range (#7756)
- Query: Property '...' is not defined for type for GroupBy with projection and ordering (#7740)
- Query: InvalidCastException when trying to Round int cast to double (#7700)
- Query: Aggregate operator generates wrong SQL with Top/Skip/Distinct (#7693)
- Query: Subquery.contains generates invalid SQL (#7666)
- Reverse engineering: Scaffolding reads and creates "hypothetical" indexes (#7665)
- Query: InvalidCastException on Where with Any (#7657)
- Query: incorrect query plan produced for complex query with groupjoins (#7654)
- Query: JOIN/Left-outer-join queries wrapped in client projection could be simplified to ShapedQueries to reduce client evaluation (#7648)
- Query: Nullable foreign-key can lead to client evaluation (#7616)
- Tools: Current Directory is wrong for .NET Core projects (#7588)
- Reverse engineering: SQL Server User Defined Data Type cannot be reverse engineered (#7576)
- Query: Navigations: Inverse one-to-one references not rewritten (#7573)
- Query: Translating Date using ".Contains" (#7548)
- Model configuration: Ignoring base types can leave behind unnecessary discriminator column (#7539)
- Migrations: AlterColumn tries to drop non-existing index on SQL Server (#7535)
- Query: Distinct followed by other operations can give rise to incorrect SQL (#7525)
- Query: Skip with Count always returns 0 (#7523)
- Query: Where() on derived property fails with undefined property on base class exception (#7499)
- Query: Error calling Count() after GroupJoin() (#7497)
- Tools: Finding runtime 1.2 compatible tools? (#7492)
- Model configuration: Non-primitive properties cannot be configured to use supported store type (#7488)
- Query: invalid cast for queries with nullable bool and coalesce (#7452)
- Query: Relational OfType op selects unnecessary columns (#7451)
- DbContext: Make AddAsync and AddRangeAsync really async (#7446)
- Query: Wrong Sql emitted when doing a .Distinct() query on a one-to-one join (#7421)
- Query: GroupJoin and SelectMany fails to translate (#7417)
- DbContext: Throw for explicit loading of an un-tracked entity (#7388)
- Model configuration: Shadow primary key should behave the same as non-shadow primary key (#7377)
- Query : ToString() method that takes a formatter argument should do client evaluation (#7364)
- Query: In TPH inheritance, int discriminator does not work, exception is thrown when compiling query (#7359)
- Query: Reference Include in derived type with siblings throws invalid cast expression (#7312)
- Query: Set operations applied after casting throws exception (#7280)
- Query: Set Operations throw ArgumentNullException when second source is DbSet (#7279)
- Query: Using Or instead of ElseOr, etc. can result in unexpected SQL (#7271)
- Model configuration: Changing PK of principal type loses the user configured index info on FK property (#7254)
- DbContext: Possible race condition affecting DbContext pooling (#7251)
- Query: Selecting column from wrong table when filtering on navigation property and using skip/take (#7220)
- Model configuration: Don't throw when SqlServer ValueGenerationStrategy is configured on an incompatible property by a convention (#7208)
- Query: compilation error for queries with navigations that also compare same navigation to null (#7207)
- Infrastructure: KeyPropagator doesn't propagate the temporality of values (#7203)
- SaveChanges: Unique indexes not taken into account during topological sort (#7193)
- Query: IncludeResultOperator not implemented in some client eval cases (#7187)
- Query: OrderBy with Contains emits invalid SQL to the DB (#7178)
- Query: Bad lifting causes some LINQ expressions to be evaluated locally when .Include() is involved (#7164)
- DbContext: Identity value generation cannot be used because the property type is byte (#7161)
- Query: Left Outer Join created incorrectly for some Skip/Take patterns (#7137)
- Query: Sum fails with "specified cast is not valid" when single/double mismatch (#7136)
- DbContext: Collection was modified; enumeration operation may not execute in some graph attach cases (#7119)
- Infrastructure: Redundant call to String.Format() in the RelationalLogger class (#7112)
- Query: 'SUM' is not a recognized built-in function name when using coalese (#7103)
- Query: Client evaluation warnings and invalid SQL generated with certain null checks (#7102)
- DbContext: ExecuteSqlCommand has poor usability when used with params and cancellation tokens (#7100)
- Infrastructure: DbSetInitializer does not check if type is not added to model (#7094)
- Query: .Where() ignored before .DefaultIfEmpty() (LEFT JOIN) (#7080)
- Infrastructure: AfterExecuteCommand tracing is missing the result info (#7073)
- Model configuration: Incorrect key discovery can result in exception saying another instance has same key, but it doesn't (#7049)
- Query: FromSql not composing with LINQ when it contains certain whitespace patterns (#7005)
- Query: Wrong SQL generated for query with group join on a subquery that is not present in the final projection (#7003)
- Query: Complex query with navigation properties, Contains, and client eval produces invalid query plan (#6997)
- Query: SubQuery with Aggregates causes unneeded queries in 1.0.0 and throws exception in 1.1.0-preview2-22683 (#6982)
- Model configuration: Configuring one-to-one in OnModelCreating causes NullReferenceException (#6957)
- Query: Contains on element coming from optional navigation doesn't get server-evaluated (#6937)
- Query: Expecting client eval warnings on Last and LastOrDefault query extensions (#6929)
- Query: System.ArgumentException: must be reducible node when using ternary operator (#6921)
- Query: Rewrite Principal key access to FK access only if FK entity is not projected out (#6896)
- Query: ArgumentOutOfRangeException when using DefaultIfEmpty() on a collection navigation in conjunction with SelectMany (#6879)
- Migrations: Attempt better ordering when adding computed columns (#6853)
- Query: Related tables sometimes result in incorrect type of join (#6844)
- Model configuration: Overlapping optional and required FKs results in attempt to null out properties inappropriately (#6840)
- Migrations: Parameterless DbContext constructor is used in preference to overload taking DbContextOptions (#6826)
- Query: Projection with nested query fails with crashing SQL query (#6824)
- Model configuration: A property that will be shadow and is used as part of an FK must be configured as a shadow property first (#6823)
- Query: NullReferenceException when property isn't marked as nullable but there is null data (#6818)
- Model configuration: Properties not always lifted correctly when using derived classes (#6814)
- Model configuration: FK exception with some combinations of property names and inheritance (#6792)
- Query: Where clause on optional reference navigation throws exception (#6782)
- Query: Include with OrderBy with Skip(0) cause OrderBy to be ignored (#6736)
- SaveChanges: The temporarity of a value is not restored after an exception during SaveChanges (#6720)
- Query: Simplifying Ternary expression in body of a Linq query breaks the query. (#6695)
- Migrations: SQLite should ignore schema rather than throwing. (#6679)
- Query: Left Join (GroupJoin) always materializes elements resulting in unnecessary data pulling (#6647)
- Query: Include doesn't work with SelectMany (#6451)
- Query: The wrong type is being selected when an extension method is used in a subquery (#6383)
- Query: Subquery comparison to null is translated incorrectly (#6353)
- Reverse engineering: Navigation properties should not be virtual by default (#6326)
- Query: orderby + include + complex projection doesn't work (#5612)
- Query: Group by on Join without DefaultIfEmpty throws ArgumentException (#5171)
- Query: Repeated joins generated for repeated .Include().ThenInclude() (#4900)
- Query: "The EF.Property method may only be used within LINQ queries" and unnecessary client-side evaluation triggered in certain generic usages (#4875)
- Query: Aggregate function over subquery produces incorrect SQL (#3792)