You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This creates/uses a database with the name “MyDatabase”. If `UseInMemoryDatabase` is called again with the same name, then the same in-memory database will be used, allowing it to be shared by multiple context instances.
140
140
141
+
## In-memory provider 'Include' operation will no longer return results if the included navigation is required but its value is null
142
+
143
+
When trying to include a required navigation and the included navigation is null, the query will no longer return result for the entity on which Include operation is applied. To avoid this problem, either provide value for required navigation or change the navigation to optional.
// returns one result because 'Sibling' navigation is optional so it doesn't have to be provided
165
+
context.People.Include(p=>p.Sibling).ToList();
166
+
```
167
+
141
168
## Read-only API changes
142
169
143
170
`IsReadOnlyBeforeSave`, `IsReadOnlyAfterSave`, and `IsStoreGeneratedAlways` have been obsoleted and replaced with [BeforeSaveBehavior](/dotnet/api/microsoft.entityframeworkcore.metadata.iproperty.beforesavebehavior) and [AfterSaveBehavior](/dotnet/api/microsoft.entityframeworkcore.metadata.iproperty.aftersavebehavior). These behaviors apply to any property (not only store-generated properties) and determine how the value of the property should be used when inserting into a database row (`BeforeSaveBehavior`) or when updating an existing database row (`AfterSaveBehavior`).
When defining DbFunction translation using `HasTranslation` method, the arguments to the function were provided as `IReadOnlyCollection<SqlExpression>`.
772
+
773
+
#### New behavior
774
+
775
+
In EF Core 6.0 the arguments are provided as `IReadOnlyList<SqlExpression>`.
776
+
777
+
#### Why
778
+
779
+
`IReadOnlyList` allows to use indexers, so the arguments are now easier to access.
780
+
781
+
#### Mitigations
782
+
783
+
None. `IReadOnlyList` implements `IReadOnlyCollection` interface, so the transition should be straightforward.
784
+
785
+
<aname="tvf-default-mapping"></a>
786
+
787
+
### Default table mapping is not removed when the entity is mapped to a table-valued function
When entity was mapped to a table-valued function, its default mapping to a table was removed.
794
+
795
+
#### New behavior
796
+
797
+
In EF Core 6.0 the entity is still mapped to a table using default mapping, even if it's also mapped to table-valued-function.
798
+
799
+
#### Why
800
+
801
+
Table-valued function returning entity is often used as a helper or to encapsulate an operation returning a collection of entities, rather than as a strict replacement of the entire table. This change aims to be more in line with the likely user intention.
802
+
803
+
#### Mitigations
804
+
805
+
Mapping to a table can be explicitly disabled in the model configuration:
0 commit comments