WIP: хочу знать сколько тут изменений #2

Draft
TImourka wants to merge 11 commits from mongoDB into main
Showing only changes of commit 3428145ff7 - Show all commits

View File

@ -102,6 +102,10 @@ namespace Forms
ImplementationMongoDB implementationMongoDB = new();
// очищаем всё
foreach (var it in implementationMongoDB.GetStatuses())
implementationMongoDB.DeleteStatus(it.Id);
foreach (var it in implementationMongoDB.GetBodyTypes())
implementationMongoDB.DeleteBodyType(it.Id);
foreach (var it in implementationMongoDB.GetBranches())
implementationMongoDB.DeleteBranch(it.Id);
foreach (var it in implementationMongoDB.GetClients())
@ -116,6 +120,8 @@ namespace Forms
ImplementationPostgres implementationPostgres = new();
// скачиваем из постгреса
var listStatuses = implementationPostgres.GetStatuses();
var listBodyTypes = implementationPostgres.GetBodyTypes();
var listBranches = implementationPostgres.GetBranches();
var listClients = implementationPostgres.GetClients();
var listCarModels = implementationPostgres.GetCarModels();
@ -123,6 +129,10 @@ namespace Forms
var listRentals = implementationPostgres.GetRentals();
// вливаем данные монго дб
foreach (var it in listStatuses)
implementationMongoDB.AddStatus(it);
foreach (var it in listBodyTypes)
implementationMongoDB.AddBodyType(it);
foreach (var it in listBranches)
implementationMongoDB.AddBranch(it);
foreach (var it in listClients)