diff --git a/Bank/BankBusinessLogics/BankBusinessLogics.csproj b/Bank/BankBusinessLogics/BankBusinessLogics.csproj
index 132c02c..1a65821 100644
--- a/Bank/BankBusinessLogics/BankBusinessLogics.csproj
+++ b/Bank/BankBusinessLogics/BankBusinessLogics.csproj
@@ -6,4 +6,13 @@
enable
+
+
+
+
+
+
+
+
+
diff --git a/Bank/BankContracts/BankContracts.csproj b/Bank/BankContracts/BankContracts.csproj
index 132c02c..3a3e2fa 100644
--- a/Bank/BankContracts/BankContracts.csproj
+++ b/Bank/BankContracts/BankContracts.csproj
@@ -6,4 +6,15 @@
enable
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
diff --git a/Bank/BankContracts/ViewModels/PurchaseViewModel.cs b/Bank/BankContracts/ViewModels/PurchaseViewModel.cs
index 6d972f8..39308ed 100644
--- a/Bank/BankContracts/ViewModels/PurchaseViewModel.cs
+++ b/Bank/BankContracts/ViewModels/PurchaseViewModel.cs
@@ -25,12 +25,12 @@ namespace BankContracts.ViewModels
$"Сделка, созданная {DatePurchase}, включает в себя операции:");
for (int i = 0; i < OperationViewModels.Count; i++)
{
- var car = OperationViewModels[i];
- if (car == null)
+ var operation = OperationViewModels[i];
+ if (operation == null)
{
break;
}
- result.Append($"\n\t{i + 1}. {car.Mark} {car.Model} стоимостью {car.Price}");
+ result.Append($"\n\t{i + 1}. {operation.Mark} {operation.Model} стоимостью {operation.Price}");
}
return result.ToString();
}
diff --git a/Bank/BankDatabaseImplement/BankDatabaseImplement.csproj b/Bank/BankDatabaseImplement/BankDatabaseImplement.csproj
index 132c02c..909dc93 100644
--- a/Bank/BankDatabaseImplement/BankDatabaseImplement.csproj
+++ b/Bank/BankDatabaseImplement/BankDatabaseImplement.csproj
@@ -6,4 +6,22 @@
enable
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
diff --git a/Bank/BankDatabaseImplement/Implements/OperationStorage.cs b/Bank/BankDatabaseImplement/Implements/OperationStorage.cs
index 7925cc9..aefd31b 100644
--- a/Bank/BankDatabaseImplement/Implements/OperationStorage.cs
+++ b/Bank/BankDatabaseImplement/Implements/OperationStorage.cs
@@ -98,14 +98,14 @@ namespace BankDatabaseImplement.Implements
public OperationViewModel? Update(OperationBindingModel model)
{
using var context = new BankDB();
- var car = context.Operations.FirstOrDefault(x => x.Id == model.Id);
- if (car == null)
+ var operation = context.Operations.FirstOrDefault(x => x.Id == model.Id);
+ if (operation == null)
{
return null;
}
- car.Update(model);
+ operation.Update(model);
context.SaveChanges();
- return car.GetViewModel;
+ return operation.GetViewModel;
}
}
}
diff --git a/Bank/BankDatabaseImplement/Implements/PurchaseStorage.cs b/Bank/BankDatabaseImplement/Implements/PurchaseStorage.cs
index 78b1e34..c4354e1 100644
--- a/Bank/BankDatabaseImplement/Implements/PurchaseStorage.cs
+++ b/Bank/BankDatabaseImplement/Implements/PurchaseStorage.cs
@@ -44,15 +44,15 @@ namespace BankDatabaseImplement.Implements
throw new ArgumentNullException(nameof(modelOperation), "Получена поисковая модель без Id");
}
using var context = new BankDB();
- var carByPurchase = context.OperationByPurchases
+ var operationByPurchase = context.OperationByPurchases
.Include(x => x.Payments)
.FirstOrDefault(x => x.OperationId == modelOperation.Id && x.PurchaseId == modelPurchase.Id);
- if (carByPurchase?.Payments == null)
+ if (operationByPurchase?.Payments == null)
{
throw new InvalidOperationException(
$"Не существует связи между данной операции(Id={modelOperation.Id}) и покупкой(Id={modelPurchase.Id})");
}
- return carByPurchase.Payments.Select(payment => payment.GetViewModel).ToList();
+ return operationByPurchase.Payments.Select(payment => payment.GetViewModel).ToList();
}
public PurchaseViewModel? GetElement(PurchaseSearchModel model)