исправление ошибок

This commit is contained in:
antoc0der 2024-04-27 11:40:09 +04:00
parent fc40e380ee
commit 595cb0205b
2 changed files with 4 additions and 0 deletions

View File

@ -17,7 +17,9 @@ namespace VeterinaryDatabaseImplement.Models
public string Password { get; set; } = string.Empty;
[ForeignKey("OwnerId")]
public virtual List<Pet> Pets { get; set; } = new();
[ForeignKey("OwnerId")]
public virtual List<Visit> Visits { get; set; } = new();
[ForeignKey("OwnerId")]
public virtual List<Purchase> Purchases { get; set; } = new();
public static Owner? Create(OwnerBindingModel model)
{

View File

@ -21,6 +21,8 @@ namespace VeterinaryDatabaseImplement.Models
public string PetGender { get; private set; } = string.Empty;
[ForeignKey("PetId")]
public virtual List<VisitPet> VisitPets { get; set; } = new();
[ForeignKey("PetId")]
public virtual List<PurchasePet> PurchasePets { get; set; } = new();
public static Pet? Create(PetBindingModel model)
{
if (model == null)