Исправлено
This commit is contained in:
parent
4a31d66ac1
commit
c201ba7e06
@ -216,7 +216,7 @@ namespace CarRepairShopDatabaseImplement.Migrations
|
|||||||
modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.MessageInfo", b =>
|
modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.MessageInfo", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("CarRepairShopDatabaseImplement.Models.Client", "Client")
|
b.HasOne("CarRepairShopDatabaseImplement.Models.Client", "Client")
|
||||||
.WithMany()
|
.WithMany("MessageInfos")
|
||||||
.HasForeignKey("ClientId");
|
.HasForeignKey("ClientId");
|
||||||
|
|
||||||
b.Navigation("Client");
|
b.Navigation("Client");
|
||||||
@ -268,6 +268,8 @@ namespace CarRepairShopDatabaseImplement.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Client", b =>
|
modelBuilder.Entity("CarRepairShopDatabaseImplement.Models.Client", b =>
|
||||||
{
|
{
|
||||||
|
b.Navigation("MessageInfos");
|
||||||
|
|
||||||
b.Navigation("Orders");
|
b.Navigation("Orders");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@ namespace CarRepairShopDatabaseImplement.Models
|
|||||||
[Required]
|
[Required]
|
||||||
public string Password { get; set; } = string.Empty;
|
public string Password { get; set; } = string.Empty;
|
||||||
[ForeignKey("ClientId")]
|
[ForeignKey("ClientId")]
|
||||||
public virtual List<Order> Orders { get; set; } =
|
public virtual List<Order> Orders { get; set; } = new();
|
||||||
new();
|
[ForeignKey("ClientId")]
|
||||||
|
public virtual List<MessageInfo> MessageInfos { get; set; } = new();
|
||||||
public static Client? Create(ClientBindingModel model)
|
public static Client? Create(ClientBindingModel model)
|
||||||
{
|
{
|
||||||
if (model == null)
|
if (model == null)
|
||||||
|
Loading…
Reference in New Issue
Block a user