Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EFCore/Properties/CoreStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/EFCore/Properties/CoreStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@
<value>The value '{value}' provided for argument '{argumentName}' must be a valid value of enum type '{enumType}'.</value>
</data>
<data name="InvalidIncludeExpression" xml:space="preserve">
<value>The expression '{expression}' is invalid inside an 'Include' operation, since it does not represent a property access: 't =&gt; t.MyProperty'. To target navigations declared on derived types, use casting ('t =&gt; ((Derived)t).MyProperty') or the 'as' operator ('t =&gt; (t as Derived).MyProperty'). Collection navigation access can be filtered by composing Where, OrderBy(Descending), ThenBy(Descending), Skip or Take operations. For more information on including related data, see https://go.microsoft.com/fwlink/?LinkID=746393.</value>
<value>The expression '{expression}' is invalid inside an 'Include' operation, since it does not represent a navigation property access: 't =&gt; t.MyProperty'. To target navigations declared on derived types, use casting ('t =&gt; ((Derived)t).MyProperty') or the 'as' operator ('t =&gt; (t as Derived).MyProperty'). Collection navigation access can be filtered by composing Where, OrderBy(Descending), ThenBy(Descending), Skip or Take operations. For more information on including related data, see https://go.microsoft.com/fwlink/?LinkID=746393.</value>
</data>
<data name="InvalidKeyValue" xml:space="preserve">
<value>Unable to track an entity of type '{entityType}' because its primary key property '{keyProperty}' is null.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@ FROM root c
""");
});

public override async Task Include_complex_property(bool async)
{
await base.Include_complex_property(async);

AssertSql();
}

public override Task Complex_type_equals_complex_type(bool async)
=> CosmosTestHelpers.Instance.NoSyncTest(
async, async async =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ FROM root c
""");
});

public override async Task Include_complex_property(bool async)
{
await base.Include_complex_property(async);

AssertSql();
}

public override Task Complex_type_equals_complex_type(bool async)
=> CosmosTestHelpers.Instance.NoSyncTest(
async, async async =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ public virtual Task Select_complex_type_Distinct(bool async)
async,
ss => ss.Set<Customer>().Select(c => c.ShippingAddress).Distinct());

[Theory, MemberData(nameof(IsAsyncData))]
public virtual async Task Include_complex_property(bool async)
=> Assert.Equal(
CoreStrings.InvalidIncludeExpression("c.ShippingAddress"),
(await Assert.ThrowsAsync<InvalidOperationException>(() => AssertQuery(
Comment thread
AndriySvyryd marked this conversation as resolved.
async,
ss => ss.Set<Customer>().Include(c => c.ShippingAddress)))).Message);

[Theory, MemberData(nameof(IsAsyncData))]
public virtual Task Complex_type_equals_complex_type(bool async)
=> AssertQuery(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@ FROM [Customer] AS [c]
""");
}

public override async Task Include_complex_property(bool async)
{
await base.Include_complex_property(async);

AssertSql();
}

public override async Task Complex_type_equals_complex_type(bool async)
{
await base.Complex_type_equals_complex_type(async);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ public override async Task Select_complex_type_Distinct(bool async)
""");
}

public override async Task Include_complex_property(bool async)
{
await base.Include_complex_property(async);

AssertSql();
}

public override async Task Complex_type_equals_complex_type(bool async)
{
await base.Complex_type_equals_complex_type(async);
Expand Down
Loading