Исполнитель: Исправление ошибок

This commit is contained in:
Yunusov_Niyaz 2024-04-25 22:45:48 +04:00
parent 531aa03753
commit 853f6fa4b0
5 changed files with 14 additions and 7 deletions

View File

@ -113,9 +113,9 @@ namespace VeterinaryBusinessLogic.BusinessLogic
throw new InvalidOperationException("Лекарство с таким названием уже есть");
}
}
public bool MakeSell(IDrugModel drug, int count)
{
return _drugStorage.SellDrugs(drug, count);
}
//public bool MakeSell(IDrugModel drug, int count)
//{
// return _drugStorage.SellDrugs(drug, count);
//}
}
}

View File

@ -17,6 +17,6 @@ namespace VeterinaryContracts.BusinessLogicContracts
bool Create(DrugBindingModel model);
bool Update(DrugBindingModel model);
bool Delete(DrugBindingModel model);
bool MakeSell(IDrugModel drug, int count);
//bool MakeSell(IDrugModel drug, int count);
}
}

View File

@ -38,8 +38,6 @@ namespace VeterinaryDatabaseImplement.Models
}
[ForeignKey("PurchaseId")]
public virtual List<PurchasePet> Pets { get; set; } = new();
[ForeignKey("PurchaseId")]
public virtual List<Drug> Drugs { get; set; } = new();
public static Purchase? Create(VeterinaryDatabase context, PurchaseBindingModel model)
{
return new Purchase()

View File

@ -34,6 +34,8 @@ namespace VeterinaryDatabaseImplement.Models
}
[ForeignKey("VisitId")]
public virtual List<VisitPet> Pets { get; set; } = new();
[ForeignKey("VisitId")]
public virtual List<Service> Services { get; set; } = new();
public static Visit? Create(VeterinaryDatabase context, VisitBindingModel model)
{
return new Visit()

View File

@ -8,6 +8,13 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.16">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VeterinaryBusinessLogic\VeterinaryBusinessLogic.csproj" />
<ProjectReference Include="..\VeterinaryDatabaseImplement\VeterinaryDatabaseImplement.csproj" />