From de4aadb9c4bdfab0527b8c392183c78db7c4bded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B0=D0=BB=D0=B8=D0=BD=D0=B0=20=D0=A4=D0=B5=D0=B4?= =?UTF-8?q?=D0=BE=D1=80=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Tue, 30 Apr 2024 23:30:22 +0400 Subject: [PATCH] =?UTF-8?q?=D1=83=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BE=D1=81?= =?UTF-8?q?=D0=BB=D0=B0=D0=B2=D0=BD=D1=8B=D1=85=20=D1=87=D1=82=D0=BE=20?= =?UTF-8?q?=D0=BD=D0=B8=20=D0=B4=D0=B5=D0=BD=D1=8C=20=D1=82=D0=BE=20=D0=B1?= =?UTF-8?q?=D0=B4=D1=81=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LawFim/LawFim.sln | 6 ++-- .../BusinessLogics/ExecutorLogic.cs | 12 ++++---- .../LawFirmDatabase.cs | 4 +-- .../LawFirmDatabaseModelSnapshot.cs | 24 ++++++++-------- .../Controllers/ConsultationController.cs | 28 ------------------- LawFim/LawFirmRestApi/Program.cs | 7 ++--- 6 files changed, 25 insertions(+), 56 deletions(-) delete mode 100644 LawFim/LawFirmRestApi/Controllers/ConsultationController.cs diff --git a/LawFim/LawFim.sln b/LawFim/LawFim.sln index ce16c3b..c163a81 100644 --- a/LawFim/LawFim.sln +++ b/LawFim/LawFim.sln @@ -13,9 +13,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFirmDatabaseImplement", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFirmRestApi", "LawFirmRestApi\LawFirmRestApi.csproj", "{7AB047DE-CA1A-4F17-93A6-F6DC13E52826}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmExecutorApp", "LawFirmExecutorApp\LawFirmExecutorApp.csproj", "{39438D19-AA0A-411C-AC9E-C181F9A551C2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFirmExecutorApp", "LawFirmExecutorApp\LawFirmExecutorApp.csproj", "{39438D19-AA0A-411C-AC9E-C181F9A551C2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LawFirmGuarantorApp", "LawFirmGuarantorApp\LawFirmGuarantorApp.csproj", "{4B6D26B1-141A-48CC-A6F7-E51BDD06C4E2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LawFirmGuarantorApp", "LawFirmGuarantorApp\LawFirmGuarantorApp.csproj", "{4B6D26B1-141A-48CC-A6F7-E51BDD06C4E2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -44,11 +44,9 @@ Global {7AB047DE-CA1A-4F17-93A6-F6DC13E52826}.Release|Any CPU.ActiveCfg = Release|Any CPU {7AB047DE-CA1A-4F17-93A6-F6DC13E52826}.Release|Any CPU.Build.0 = Release|Any CPU {39438D19-AA0A-411C-AC9E-C181F9A551C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {39438D19-AA0A-411C-AC9E-C181F9A551C2}.Debug|Any CPU.Build.0 = Debug|Any CPU {39438D19-AA0A-411C-AC9E-C181F9A551C2}.Release|Any CPU.ActiveCfg = Release|Any CPU {39438D19-AA0A-411C-AC9E-C181F9A551C2}.Release|Any CPU.Build.0 = Release|Any CPU {4B6D26B1-141A-48CC-A6F7-E51BDD06C4E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B6D26B1-141A-48CC-A6F7-E51BDD06C4E2}.Debug|Any CPU.Build.0 = Debug|Any CPU {4B6D26B1-141A-48CC-A6F7-E51BDD06C4E2}.Release|Any CPU.ActiveCfg = Release|Any CPU {4B6D26B1-141A-48CC-A6F7-E51BDD06C4E2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/LawFim/LawFirmBusinessLogic/BusinessLogics/ExecutorLogic.cs b/LawFim/LawFirmBusinessLogic/BusinessLogics/ExecutorLogic.cs index 1aa0d82..43e4345 100644 --- a/LawFim/LawFirmBusinessLogic/BusinessLogics/ExecutorLogic.cs +++ b/LawFim/LawFirmBusinessLogic/BusinessLogics/ExecutorLogic.cs @@ -17,13 +17,13 @@ namespace LawFirmBusinessLogic.BusinessLogics private readonly ILogger _logger; private readonly IExecutorStorage _executorStorage; - public ExecutorLogic(ILogger logger, IExecutorStorage executorStorage) - { - _logger = logger; - _executorStorage = executorStorage; - } + public ExecutorLogic(ILogger logger, IExecutorStorage executorStorage) + { + _logger = logger; + _executorStorage = executorStorage; + } - public bool Create(ExecutorBindingModel model) + public bool Create(ExecutorBindingModel model) { CheckModel(model); if (_executorStorage.Insert(model) == null) diff --git a/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs b/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs index 022c99d..4d12370 100644 --- a/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs +++ b/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs @@ -11,9 +11,9 @@ namespace LawFirmDatabaseImplement { if (optionsBuilder.IsConfigured == false) { - //optionsBuilder.UseSqlServer(@"Data Source=ZIRAEL\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + optionsBuilder.UseSqlServer(@"Data Source=ZIRAEL\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); - optionsBuilder.UseSqlServer(@"Data Source=PC-Anna\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + //optionsBuilder.UseSqlServer(@"Data Source=PC-Anna\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } diff --git a/LawFim/LawFirmDatabaseImplement/Migrations/LawFirmDatabaseModelSnapshot.cs b/LawFim/LawFirmDatabaseImplement/Migrations/LawFirmDatabaseModelSnapshot.cs index 5c8d4c6..4ccfe2f 100644 --- a/LawFim/LawFirmDatabaseImplement/Migrations/LawFirmDatabaseModelSnapshot.cs +++ b/LawFim/LawFirmDatabaseImplement/Migrations/LawFirmDatabaseModelSnapshot.cs @@ -54,7 +54,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("ExecutorId"); - b.ToTable("Cases"); + b.ToTable("Cases", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.CaseClient", b => @@ -77,7 +77,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("ClientId"); - b.ToTable("CaseClients"); + b.ToTable("CaseClients", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.Client", b => @@ -107,7 +107,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("ExecutorId"); - b.ToTable("Clients"); + b.ToTable("Clients", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.Consultation", b => @@ -136,7 +136,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("GuarantorId"); - b.ToTable("Consultations"); + b.ToTable("Consultations", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.ConsultationLawyer", b => @@ -159,7 +159,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("LawyerId"); - b.ToTable("ConsultationLawyers"); + b.ToTable("ConsultationLawyers", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.Executor", b => @@ -184,7 +184,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasKey("Id"); - b.ToTable("Executors"); + b.ToTable("Executors", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.Guarantor", b => @@ -209,7 +209,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasKey("Id"); - b.ToTable("Guarantors"); + b.ToTable("Guarantors", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.Hearing", b => @@ -234,7 +234,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("GuarantorId"); - b.ToTable("Hearings"); + b.ToTable("Hearings", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.HearingLawyer", b => @@ -257,7 +257,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("LawyerId"); - b.ToTable("HearingLawyers"); + b.ToTable("HearingLawyers", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.Lawyer", b => @@ -287,7 +287,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("GuarantorId"); - b.ToTable("Lawyers"); + b.ToTable("Lawyers", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.Visit", b => @@ -313,7 +313,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("HearingId"); - b.ToTable("Visits"); + b.ToTable("Visits", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.VisitClient", b => @@ -336,7 +336,7 @@ namespace LawFirmDatabaseImplement.Migrations b.HasIndex("VisitId"); - b.ToTable("VisitClients"); + b.ToTable("VisitClients", (string)null); }); modelBuilder.Entity("LawFirmDatabaseImplement.Models.Case", b => diff --git a/LawFim/LawFirmRestApi/Controllers/ConsultationController.cs b/LawFim/LawFirmRestApi/Controllers/ConsultationController.cs deleted file mode 100644 index 1f2e59a..0000000 --- a/LawFim/LawFirmRestApi/Controllers/ConsultationController.cs +++ /dev/null @@ -1,28 +0,0 @@ -using LawFirmBusinessLogic.BusinessLogics; -using LawFirmContracts.BusinessLogicContracts; -using Microsoft.AspNetCore.Mvc; - -namespace LawFirmRestApi.Controllers -{ - [Route("api/[controller]/[action]")] - [ApiController] - public class ConsultationController : Controller - { - private readonly ILogger _logger; - private readonly IConsultationLogic _logic; - private readonly ILawyerLogic _lawyerlogic; - - public ConsultationController(IConsultationLogic logic, ILogger - logger, ILawyerLogic lawyerLogic) - { - _logger = logger; - _logic = logic; - _lawyerlogic = lawyerLogic; - - } - public IActionResult Index() - { - return View(); - } - } -} diff --git a/LawFim/LawFirmRestApi/Program.cs b/LawFim/LawFirmRestApi/Program.cs index b6a0b51..2f90ae2 100644 --- a/LawFim/LawFirmRestApi/Program.cs +++ b/LawFim/LawFirmRestApi/Program.cs @@ -19,7 +19,7 @@ builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); -//builder.Services.AddTransient(); +builder.Services.AddTransient(); //builder.Services.AddTransient(); @@ -31,7 +31,7 @@ builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); -//builder.Services.AddTransient(); +builder.Services.AddTransient(); //builder.Services.AddTransient(); @@ -41,8 +41,7 @@ builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(c => c.SwaggerDoc("v1", new OpenApiInfo { Title = "LawFirmRestApi", - Version -= "v1" + Version = "v1" })); var app = builder.Build();