|
|
|
|
@ -389,6 +389,364 @@ FROM `Customer` AS `c0`
|
|
|
|
|
AssertSql();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Filter_on_property_inside_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Filter_on_property_inside_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`Id`, `v`.`Name`, `v`.`BillingAddress_AddressLine1`, `v`.`BillingAddress_AddressLine2`, `v`.`BillingAddress_ZipCode`, `v`.`BillingAddress_Country_Code`, `v`.`BillingAddress_Country_FullName`, `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`ShippingAddress_ZipCode` = 7728
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Filter_on_property_inside_nested_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Filter_on_property_inside_nested_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`Id`, `v`.`Name`, `v`.`BillingAddress_AddressLine1`, `v`.`BillingAddress_AddressLine2`, `v`.`BillingAddress_ZipCode`, `v`.`BillingAddress_Country_Code`, `v`.`BillingAddress_Country_FullName`, `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`ShippingAddress_Country_Code` = 'DE'
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Filter_on_property_inside_struct_complex_type_after_subquery(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Filter_on_property_inside_struct_complex_type_after_subquery(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
@__p_0='1'
|
|
|
|
|
|
|
|
|
|
SELECT DISTINCT [t].[Id], [t].[Name], [t].[BillingAddress_AddressLine1], [t].[BillingAddress_AddressLine2], [t].[BillingAddress_ZipCode], [t].[BillingAddress_Country_Code], [t].[BillingAddress_Country_FullName], [t].[ShippingAddress_AddressLine1], [t].[ShippingAddress_AddressLine2], [t].[ShippingAddress_ZipCode], [t].[ShippingAddress_Country_Code], [t].[ShippingAddress_Country_FullName]
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT [v].[Id], [v].[Name], [v].[BillingAddress_AddressLine1], [v].[BillingAddress_AddressLine2], [v].[BillingAddress_ZipCode], [v].[BillingAddress_Country_Code], [v].[BillingAddress_Country_FullName], [v].[ShippingAddress_AddressLine1], [v].[ShippingAddress_AddressLine2], [v].[ShippingAddress_ZipCode], [v].[ShippingAddress_Country_Code], [v].[ShippingAddress_Country_FullName]
|
|
|
|
|
FROM [ValuedCustomer] AS [v]
|
|
|
|
|
ORDER BY [v].[Id]
|
|
|
|
|
OFFSET @__p_0 ROWS
|
|
|
|
|
) AS [t]
|
|
|
|
|
WHERE [t].[ShippingAddress_ZipCode] = 7728
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Filter_on_property_inside_nested_struct_complex_type_after_subquery(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Filter_on_property_inside_nested_struct_complex_type_after_subquery(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
@__p_0='1'
|
|
|
|
|
|
|
|
|
|
SELECT DISTINCT [t].[Id], [t].[Name], [t].[BillingAddress_AddressLine1], [t].[BillingAddress_AddressLine2], [t].[BillingAddress_ZipCode], [t].[BillingAddress_Country_Code], [t].[BillingAddress_Country_FullName], [t].[ShippingAddress_AddressLine1], [t].[ShippingAddress_AddressLine2], [t].[ShippingAddress_ZipCode], [t].[ShippingAddress_Country_Code], [t].[ShippingAddress_Country_FullName]
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT [v].[Id], [v].[Name], [v].[BillingAddress_AddressLine1], [v].[BillingAddress_AddressLine2], [v].[BillingAddress_ZipCode], [v].[BillingAddress_Country_Code], [v].[BillingAddress_Country_FullName], [v].[ShippingAddress_AddressLine1], [v].[ShippingAddress_AddressLine2], [v].[ShippingAddress_ZipCode], [v].[ShippingAddress_Country_Code], [v].[ShippingAddress_Country_FullName]
|
|
|
|
|
FROM [ValuedCustomer] AS [v]
|
|
|
|
|
ORDER BY [v].[Id]
|
|
|
|
|
OFFSET @__p_0 ROWS
|
|
|
|
|
) AS [t]
|
|
|
|
|
WHERE [t].[ShippingAddress_Country_Code] = N'DE'
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Filter_on_required_property_inside_required_struct_complex_type_on_optional_navigation(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Filter_on_required_property_inside_required_struct_complex_type_on_optional_navigation(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`Id`, `v`.`OptionalCustomerId`, `v`.`RequiredCustomerId`, `v0`.`Id`, `v0`.`Name`, `v0`.`BillingAddress_AddressLine1`, `v0`.`BillingAddress_AddressLine2`, `v0`.`BillingAddress_ZipCode`, `v0`.`BillingAddress_Country_Code`, `v0`.`BillingAddress_Country_FullName`, `v0`.`ShippingAddress_AddressLine1`, `v0`.`ShippingAddress_AddressLine2`, `v0`.`ShippingAddress_ZipCode`, `v0`.`ShippingAddress_Country_Code`, `v0`.`ShippingAddress_Country_FullName`, `v1`.`Id`, `v1`.`Name`, `v1`.`BillingAddress_AddressLine1`, `v1`.`BillingAddress_AddressLine2`, `v1`.`BillingAddress_ZipCode`, `v1`.`BillingAddress_Country_Code`, `v1`.`BillingAddress_Country_FullName`, `v1`.`ShippingAddress_AddressLine1`, `v1`.`ShippingAddress_AddressLine2`, `v1`.`ShippingAddress_ZipCode`, `v1`.`ShippingAddress_Country_Code`, `v1`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM (`ValuedCustomerGroup` AS `v`
|
|
|
|
|
LEFT JOIN `ValuedCustomer` AS `v0` ON `v`.`OptionalCustomerId` = `v0`.`Id`)
|
|
|
|
|
INNER JOIN `ValuedCustomer` AS `v1` ON `v`.`RequiredCustomerId` = `v1`.`Id`
|
|
|
|
|
WHERE `v0`.`ShippingAddress_ZipCode` <> 7728 OR `v0`.`ShippingAddress_ZipCode` IS NULL
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Filter_on_required_property_inside_required_struct_complex_type_on_required_navigation(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Filter_on_required_property_inside_required_struct_complex_type_on_required_navigation(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`Id`, `v`.`OptionalCustomerId`, `v`.`RequiredCustomerId`, `v1`.`Id`, `v1`.`Name`, `v1`.`BillingAddress_AddressLine1`, `v1`.`BillingAddress_AddressLine2`, `v1`.`BillingAddress_ZipCode`, `v1`.`BillingAddress_Country_Code`, `v1`.`BillingAddress_Country_FullName`, `v1`.`ShippingAddress_AddressLine1`, `v1`.`ShippingAddress_AddressLine2`, `v1`.`ShippingAddress_ZipCode`, `v1`.`ShippingAddress_Country_Code`, `v1`.`ShippingAddress_Country_FullName`, `v0`.`Id`, `v0`.`Name`, `v0`.`BillingAddress_AddressLine1`, `v0`.`BillingAddress_AddressLine2`, `v0`.`BillingAddress_ZipCode`, `v0`.`BillingAddress_Country_Code`, `v0`.`BillingAddress_Country_FullName`, `v0`.`ShippingAddress_AddressLine1`, `v0`.`ShippingAddress_AddressLine2`, `v0`.`ShippingAddress_ZipCode`, `v0`.`ShippingAddress_Country_Code`, `v0`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM (`ValuedCustomerGroup` AS `v`
|
|
|
|
|
INNER JOIN `ValuedCustomer` AS `v0` ON `v`.`RequiredCustomerId` = `v0`.`Id`)
|
|
|
|
|
LEFT JOIN `ValuedCustomer` AS `v1` ON `v`.`OptionalCustomerId` = `v1`.`Id`
|
|
|
|
|
WHERE `v0`.`ShippingAddress_ZipCode` <> 7728
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// EF Core problem itself. See same test in SQL Server
|
|
|
|
|
public override async Task Project_struct_complex_type_via_optional_navigation(bool async)
|
|
|
|
|
{
|
|
|
|
|
var exception = await Assert.ThrowsAsync<InvalidOperationException>(() => base.Project_struct_complex_type_via_optional_navigation(async));
|
|
|
|
|
|
|
|
|
|
Assert.Equal(RelationalStrings.CannotProjectNullableComplexType("ValuedCustomer.ShippingAddress#AddressStruct"), exception.Message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Project_struct_complex_type_via_required_navigation(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Project_struct_complex_type_via_required_navigation(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v0`.`ShippingAddress_AddressLine1`, `v0`.`ShippingAddress_AddressLine2`, `v0`.`ShippingAddress_ZipCode`, `v0`.`ShippingAddress_Country_Code`, `v0`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomerGroup` AS `v`
|
|
|
|
|
INNER JOIN `ValuedCustomer` AS `v0` ON `v`.`RequiredCustomerId` = `v0`.`Id`
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Load_struct_complex_type_after_subquery_on_entity_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Load_struct_complex_type_after_subquery_on_entity_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
@__p_0='1'
|
|
|
|
|
|
|
|
|
|
SELECT DISTINCT [t].[Id], [t].[Name], [t].[BillingAddress_AddressLine1], [t].[BillingAddress_AddressLine2], [t].[BillingAddress_ZipCode], [t].[BillingAddress_Country_Code], [t].[BillingAddress_Country_FullName], [t].[ShippingAddress_AddressLine1], [t].[ShippingAddress_AddressLine2], [t].[ShippingAddress_ZipCode], [t].[ShippingAddress_Country_Code], [t].[ShippingAddress_Country_FullName]
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT [v].[Id], [v].[Name], [v].[BillingAddress_AddressLine1], [v].[BillingAddress_AddressLine2], [v].[BillingAddress_ZipCode], [v].[BillingAddress_Country_Code], [v].[BillingAddress_Country_FullName], [v].[ShippingAddress_AddressLine1], [v].[ShippingAddress_AddressLine2], [v].[ShippingAddress_ZipCode], [v].[ShippingAddress_Country_Code], [v].[ShippingAddress_Country_FullName]
|
|
|
|
|
FROM [ValuedCustomer] AS [v]
|
|
|
|
|
ORDER BY [v].[Id]
|
|
|
|
|
OFFSET @__p_0 ROWS
|
|
|
|
|
) AS [t]
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Select_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Select_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Select_nested_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Select_nested_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Select_single_property_on_nested_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Select_single_property_on_nested_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Select_struct_complex_type_Where(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Select_struct_complex_type_Where(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`ShippingAddress_ZipCode` = 7728
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Select_struct_complex_type_Distinct(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Select_struct_complex_type_Distinct(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT DISTINCT `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Struct_complex_type_equals_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Struct_complex_type_equals_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`Id`, `v`.`Name`, `v`.`BillingAddress_AddressLine1`, `v`.`BillingAddress_AddressLine2`, `v`.`BillingAddress_ZipCode`, `v`.`BillingAddress_Country_Code`, `v`.`BillingAddress_Country_FullName`, `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`ShippingAddress_AddressLine1` = `v`.`BillingAddress_AddressLine1` AND (`v`.`ShippingAddress_AddressLine2` = `v`.`BillingAddress_AddressLine2` OR (`v`.`ShippingAddress_AddressLine2` IS NULL AND `v`.`BillingAddress_AddressLine2` IS NULL)) AND `v`.`ShippingAddress_ZipCode` = `v`.`BillingAddress_ZipCode`
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Struct_complex_type_equals_constant(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Struct_complex_type_equals_constant(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`Id`, `v`.`Name`, `v`.`BillingAddress_AddressLine1`, `v`.`BillingAddress_AddressLine2`, `v`.`BillingAddress_ZipCode`, `v`.`BillingAddress_Country_Code`, `v`.`BillingAddress_Country_FullName`, `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`ShippingAddress_AddressLine1` = '804 S. Lakeshore Road' AND `v`.`ShippingAddress_AddressLine2` IS NULL AND `v`.`ShippingAddress_ZipCode` = 38654 AND `v`.`ShippingAddress_Country_Code` = 'US' AND `v`.`ShippingAddress_Country_FullName` = 'United States'
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Struct_complex_type_equals_parameter(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Struct_complex_type_equals_parameter(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
@__entity_equality_address_0_AddressLine1='804 S. Lakeshore Road' (Size = 255)
|
|
|
|
|
@__entity_equality_address_0_ZipCode='38654' (Nullable = true)
|
|
|
|
|
@__entity_equality_address_0_Code='US' (Size = 255)
|
|
|
|
|
@__entity_equality_address_0_FullName='United States' (Size = 255)
|
|
|
|
|
|
|
|
|
|
SELECT `v`.`Id`, `v`.`Name`, `v`.`BillingAddress_AddressLine1`, `v`.`BillingAddress_AddressLine2`, `v`.`BillingAddress_ZipCode`, `v`.`BillingAddress_Country_Code`, `v`.`BillingAddress_Country_FullName`, `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`ShippingAddress_AddressLine1` = @__entity_equality_address_0_AddressLine1 AND `v`.`ShippingAddress_AddressLine2` IS NULL AND `v`.`ShippingAddress_ZipCode` = @__entity_equality_address_0_ZipCode AND `v`.`ShippingAddress_Country_Code` = @__entity_equality_address_0_Code AND `v`.`ShippingAddress_Country_FullName` = @__entity_equality_address_0_FullName
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Subquery_over_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Subquery_over_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Contains_over_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Contains_over_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
@__entity_equality_address_0_AddressLine1='804 S. Lakeshore Road' (Size = 255)
|
|
|
|
|
@__entity_equality_address_0_ZipCode='38654' (Nullable = true)
|
|
|
|
|
@__entity_equality_address_0_Code='US' (Size = 255)
|
|
|
|
|
@__entity_equality_address_0_FullName='United States' (Size = 255)
|
|
|
|
|
|
|
|
|
|
SELECT `v`.`Id`, `v`.`Name`, `v`.`BillingAddress_AddressLine1`, `v`.`BillingAddress_AddressLine2`, `v`.`BillingAddress_ZipCode`, `v`.`BillingAddress_Country_Code`, `v`.`BillingAddress_Country_FullName`, `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE EXISTS (
|
|
|
|
|
SELECT 1
|
|
|
|
|
FROM `ValuedCustomer` AS `v0`
|
|
|
|
|
WHERE `v0`.`ShippingAddress_AddressLine1` = @__entity_equality_address_0_AddressLine1 AND `v0`.`ShippingAddress_AddressLine2` IS NULL AND `v0`.`ShippingAddress_ZipCode` = @__entity_equality_address_0_ZipCode AND `v0`.`ShippingAddress_Country_Code` = @__entity_equality_address_0_Code AND `v0`.`ShippingAddress_Country_FullName` = @__entity_equality_address_0_FullName)
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Concat_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Concat_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`Id` = 1
|
|
|
|
|
UNION ALL
|
|
|
|
|
SELECT `v0`.`ShippingAddress_AddressLine1`, `v0`.`ShippingAddress_AddressLine2`, `v0`.`ShippingAddress_ZipCode`, `v0`.`ShippingAddress_Country_Code`, `v0`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v0`
|
|
|
|
|
WHERE `v0`.`Id` = 2
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Concat_entity_type_containing_struct_complex_property(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Concat_entity_type_containing_struct_complex_property(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`Id`, `v`.`Name`, `v`.`BillingAddress_AddressLine1`, `v`.`BillingAddress_AddressLine2`, `v`.`BillingAddress_ZipCode`, `v`.`BillingAddress_Country_Code`, `v`.`BillingAddress_Country_FullName`, `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`Id` = 1
|
|
|
|
|
UNION ALL
|
|
|
|
|
SELECT `v0`.`Id`, `v0`.`Name`, `v0`.`BillingAddress_AddressLine1`, `v0`.`BillingAddress_AddressLine2`, `v0`.`BillingAddress_ZipCode`, `v0`.`BillingAddress_Country_Code`, `v0`.`BillingAddress_Country_FullName`, `v0`.`ShippingAddress_AddressLine1`, `v0`.`ShippingAddress_AddressLine2`, `v0`.`ShippingAddress_ZipCode`, `v0`.`ShippingAddress_Country_Code`, `v0`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v0`
|
|
|
|
|
WHERE `v0`.`Id` = 2
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Union_entity_type_containing_struct_complex_property(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Union_entity_type_containing_struct_complex_property(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`Id`, `v`.`Name`, `v`.`BillingAddress_AddressLine1`, `v`.`BillingAddress_AddressLine2`, `v`.`BillingAddress_ZipCode`, `v`.`BillingAddress_Country_Code`, `v`.`BillingAddress_Country_FullName`, `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`Id` = 1
|
|
|
|
|
UNION
|
|
|
|
|
SELECT `v0`.`Id`, `v0`.`Name`, `v0`.`BillingAddress_AddressLine1`, `v0`.`BillingAddress_AddressLine2`, `v0`.`BillingAddress_ZipCode`, `v0`.`BillingAddress_Country_Code`, `v0`.`BillingAddress_Country_FullName`, `v0`.`ShippingAddress_AddressLine1`, `v0`.`ShippingAddress_AddressLine2`, `v0`.`ShippingAddress_ZipCode`, `v0`.`ShippingAddress_Country_Code`, `v0`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v0`
|
|
|
|
|
WHERE `v0`.`Id` = 2
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Union_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Union_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`ShippingAddress_AddressLine1`, `v`.`ShippingAddress_AddressLine2`, `v`.`ShippingAddress_ZipCode`, `v`.`ShippingAddress_Country_Code`, `v`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
WHERE `v`.`Id` = 1
|
|
|
|
|
UNION
|
|
|
|
|
SELECT `v0`.`ShippingAddress_AddressLine1`, `v0`.`ShippingAddress_AddressLine2`, `v0`.`ShippingAddress_ZipCode`, `v0`.`ShippingAddress_Country_Code`, `v0`.`ShippingAddress_Country_FullName`
|
|
|
|
|
FROM `ValuedCustomer` AS `v0`
|
|
|
|
|
WHERE `v0`.`Id` = 2
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Concat_property_in_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Concat_property_in_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`ShippingAddress_AddressLine1`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
UNION ALL
|
|
|
|
|
SELECT `v0`.`BillingAddress_AddressLine1` AS `ShippingAddress_AddressLine1`
|
|
|
|
|
FROM `ValuedCustomer` AS `v0`
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Union_property_in_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Union_property_in_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql(
|
|
|
|
|
"""
|
|
|
|
|
SELECT `v`.`ShippingAddress_AddressLine1`
|
|
|
|
|
FROM `ValuedCustomer` AS `v`
|
|
|
|
|
UNION
|
|
|
|
|
SELECT `v0`.`BillingAddress_AddressLine1` AS `ShippingAddress_AddressLine1`
|
|
|
|
|
FROM `ValuedCustomer` AS `v0`
|
|
|
|
|
""");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Concat_two_different_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Concat_two_different_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override async Task Union_two_different_struct_complex_type(bool async)
|
|
|
|
|
{
|
|
|
|
|
await base.Union_two_different_struct_complex_type(async);
|
|
|
|
|
|
|
|
|
|
AssertSql();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[ConditionalFact]
|
|
|
|
|
public virtual void Check_all_tests_overridden()
|
|
|
|
|
=> TestHelpers.AssertAllMethodsOverridden(GetType());
|
|
|
|
|
|