diff --git a/SoftwareInstallation/SoftwareInstallationBusinessLogic/BusinessLogic/ImplementerLogic.cs b/SoftwareInstallation/SoftwareInstallationBusinessLogic/BusinessLogic/ImplementerLogic.cs
index 63f16ed..c925a42 100644
--- a/SoftwareInstallation/SoftwareInstallationBusinessLogic/BusinessLogic/ImplementerLogic.cs
+++ b/SoftwareInstallation/SoftwareInstallationBusinessLogic/BusinessLogic/ImplementerLogic.cs
@@ -50,6 +50,7 @@ namespace SoftwareInstallationBusinessLogic.BusinessLogic
_logger.LogInformation("ReadElement. FIO:{FIO}.Id:{ Id}",
model.ImplementerFIO, model.Id);
var element = _implementerStorage.GetElement(model);
+
if (element == null)
{
_logger.LogWarning("ReadElement element not found");
diff --git a/SoftwareInstallation/SoftwareInstallationBusinessLogic/BusinessLogic/WorkModeling.cs b/SoftwareInstallation/SoftwareInstallationBusinessLogic/BusinessLogic/WorkModeling.cs
index 9c9858b..7bd001d 100644
--- a/SoftwareInstallation/SoftwareInstallationBusinessLogic/BusinessLogic/WorkModeling.cs
+++ b/SoftwareInstallation/SoftwareInstallationBusinessLogic/BusinessLogic/WorkModeling.cs
@@ -37,7 +37,9 @@ namespace SoftwareInstallationBusinessLogic.BusinessLogic
_logger.LogWarning("DoWork. Orders is null or empty");
return;
}
+
_logger.LogDebug("DoWork for {Count} orders", orders.Count);
+
foreach (var implementer in implementers)
{
Task.Run(() => WorkerWorkAsync(implementer, orders));
@@ -68,6 +70,7 @@ namespace SoftwareInstallationBusinessLogic.BusinessLogic
Thread.Sleep(implementer.WorkExperience * _rnd.Next(100, 1000) * order.Count);
_logger.LogDebug("DoWork. Worker {Id} finish order {Order}", implementer.Id, order.Id);
+
_orderLogic.DeliveryOrder(new OrderBindingModel
{
Id = order.Id
@@ -98,7 +101,6 @@ namespace SoftwareInstallationBusinessLogic.BusinessLogic
}
try
{
-
var runOrder = await Task.Run(() => allOrders.FirstOrDefault(x => x.ImplementerId == implementer.Id && x.Status == OrderStatus.Выполняется));
if (runOrder == null)
{
diff --git a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230410192808_CreateBD.Designer.cs b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230411045909_CreateDB.Designer.cs
similarity index 99%
rename from SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230410192808_CreateBD.Designer.cs
rename to SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230411045909_CreateDB.Designer.cs
index 485ae55..a71ea52 100644
--- a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230410192808_CreateBD.Designer.cs
+++ b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230411045909_CreateDB.Designer.cs
@@ -12,8 +12,8 @@ using SoftwareInstallationDataBaseImplement;
namespace SoftwareInstallationDataBaseImplement.Migrations
{
[DbContext(typeof(SoftwareInstallationDataBase))]
- [Migration("20230410192808_CreateBD")]
- partial class CreateBD
+ [Migration("20230411045909_CreateDB")]
+ partial class CreateDB
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
diff --git a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230410192808_CreateBD.cs b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230411045909_CreateDB.cs
similarity index 99%
rename from SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230410192808_CreateBD.cs
rename to SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230411045909_CreateDB.cs
index 9862e67..55e2797 100644
--- a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230410192808_CreateBD.cs
+++ b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230411045909_CreateDB.cs
@@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
namespace SoftwareInstallationDataBaseImplement.Migrations
{
///
- public partial class CreateBD : Migration
+ public partial class CreateDB : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
diff --git a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/SoftwareInstallationDataBase.cs b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/SoftwareInstallationDataBase.cs
index 70cba53..abfab29 100644
--- a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/SoftwareInstallationDataBase.cs
+++ b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/SoftwareInstallationDataBase.cs
@@ -9,7 +9,7 @@ namespace SoftwareInstallationDataBaseImplement
{
if (optionsBuilder.IsConfigured == false)
{
- optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-VG5USAH\SQLEXPRESS;Initial Catalog=SoftwareInstallationDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
+ optionsBuilder.UseSqlServer(@"Data Source=COMP-AVZH\SQLEXPRESS;Initial Catalog=SoftwareInstallationDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
}
base.OnConfiguring(optionsBuilder);
}