-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the correct shared foreign key for navigation fixup (#21834)
Fixes #20719
- Loading branch information
1 parent
e57ec85
commit a0342cc
Showing
13 changed files
with
153 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/EFCore.Specification.Tests/TestModels/UpdatesModel/Category.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.EntityFrameworkCore.TestModels.UpdatesModel | ||
{ | ||
public class Category | ||
{ | ||
public int Id { get; set; } | ||
public int? PrincipalId { get; set; } | ||
public string Name { get; set; } | ||
public ICollection<ProductCategory> ProductCategories { get; set; } | ||
} | ||
} |
7 changes: 4 additions & 3 deletions
7
test/EFCore.Specification.Tests/TestModels/UpdatesModel/Product.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Microsoft.EntityFrameworkCore.TestModels.UpdatesModel | ||
{ | ||
public class Product | ||
public class Product : ProductBase | ||
{ | ||
public Guid Id { get; set; } | ||
public int? DependentId { get; set; } | ||
public string Name { get; set; } | ||
|
||
[ConcurrencyCheck] | ||
public decimal Price { get; set; } | ||
|
||
public ICollection<ProductCategory> ProductCategories { get; set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
test/EFCore.Specification.Tests/TestModels/UpdatesModel/ProductBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
|
||
namespace Microsoft.EntityFrameworkCore.TestModels.UpdatesModel | ||
{ | ||
public abstract class ProductBase | ||
{ | ||
public Guid Id { get; set; } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
test/EFCore.Specification.Tests/TestModels/UpdatesModel/ProductCategory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
|
||
namespace Microsoft.EntityFrameworkCore.TestModels.UpdatesModel | ||
{ | ||
public class ProductCategory | ||
{ | ||
public int CategoryId { get; set; } | ||
public Guid ProductId { get; set; } | ||
} | ||
} |
7 changes: 4 additions & 3 deletions
7
test/EFCore.Specification.Tests/TestModels/UpdatesModel/ProductWithBytes.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Microsoft.EntityFrameworkCore.TestModels.UpdatesModel | ||
{ | ||
public class ProductWithBytes | ||
public class ProductWithBytes : ProductBase | ||
{ | ||
public Guid Id { get; set; } | ||
public string Name { get; set; } | ||
|
||
[ConcurrencyCheck] | ||
public byte[] Bytes { get; set; } | ||
|
||
public ICollection<ProductCategory> ProductCategories { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters