From 85cf278f6251508c4c9fae92f011f9a84f233a1b Mon Sep 17 00:00:00 2001 From: Aidar Date: Thu, 5 Dec 2024 18:29:07 +0400 Subject: [PATCH] =?UTF-8?q?LabWork=202.0.1=20(=D0=9F=D0=BE=D0=B4=D0=BA?= =?UTF-8?q?=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B8=D0=B1?= =?UTF-8?q?=D0=BB=D0=B8=D0=BE=D1=82=D0=B5=D0=BA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Forms/FormBusRepair.Designer.cs | 1 - .../ProjectAutoenterprise/Program.cs | 2 ++ .../ProjectAutoenterprise.csproj | 16 ++++++++++++++++ .../Repositories/IConnectionString.cs | 6 ++++++ .../Implementations/ConnectionString.cs | 6 ++++++ .../Implementations/RouteRepository.cs | 7 +++++++ .../ProjectAutoenterprise/appsettings.json | 15 +++++++++++++++ 7 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 ProjectAutoenterprise/ProjectAutoenterprise/Repositories/IConnectionString.cs create mode 100644 ProjectAutoenterprise/ProjectAutoenterprise/Repositories/Implementations/ConnectionString.cs create mode 100644 ProjectAutoenterprise/ProjectAutoenterprise/appsettings.json diff --git a/ProjectAutoenterprise/ProjectAutoenterprise/Forms/FormBusRepair.Designer.cs b/ProjectAutoenterprise/ProjectAutoenterprise/Forms/FormBusRepair.Designer.cs index 8423dd5..dd7762b 100644 --- a/ProjectAutoenterprise/ProjectAutoenterprise/Forms/FormBusRepair.Designer.cs +++ b/ProjectAutoenterprise/ProjectAutoenterprise/Forms/FormBusRepair.Designer.cs @@ -145,7 +145,6 @@ private Label label1; private Label label2; private Label label3; - private NumericUpDown numericUpDown1; private DateTimePicker dateTimePickerRepairDate; private TextBox textBoxDescription; private Button buttonCancel; diff --git a/ProjectAutoenterprise/ProjectAutoenterprise/Program.cs b/ProjectAutoenterprise/ProjectAutoenterprise/Program.cs index 7ddbc3e..dca5fca 100644 --- a/ProjectAutoenterprise/ProjectAutoenterprise/Program.cs +++ b/ProjectAutoenterprise/ProjectAutoenterprise/Program.cs @@ -26,6 +26,8 @@ namespace ProjectAutoenterprise container.RegisterType(new TransientLifetimeManager()); container.RegisterType(new TransientLifetimeManager()); container.RegisterType(new TransientLifetimeManager()); + + container.RegisterType(new TransientLifetimeManager()); return container; } } diff --git a/ProjectAutoenterprise/ProjectAutoenterprise/ProjectAutoenterprise.csproj b/ProjectAutoenterprise/ProjectAutoenterprise/ProjectAutoenterprise.csproj index accbdf0..1de707e 100644 --- a/ProjectAutoenterprise/ProjectAutoenterprise/ProjectAutoenterprise.csproj +++ b/ProjectAutoenterprise/ProjectAutoenterprise/ProjectAutoenterprise.csproj @@ -9,7 +9,17 @@ + + + + + + + + + + @@ -27,4 +37,10 @@ + + + PreserveNewest + + + \ No newline at end of file diff --git a/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/IConnectionString.cs b/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/IConnectionString.cs new file mode 100644 index 0000000..fe0a905 --- /dev/null +++ b/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/IConnectionString.cs @@ -0,0 +1,6 @@ +namespace ProjectAutoenterprise.Repositories; + +internal interface IConnectionString +{ + string ConnectionString { get; } +} \ No newline at end of file diff --git a/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/Implementations/ConnectionString.cs b/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/Implementations/ConnectionString.cs new file mode 100644 index 0000000..15eaea7 --- /dev/null +++ b/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/Implementations/ConnectionString.cs @@ -0,0 +1,6 @@ +namespace ProjectAutoenterprise.Repositories.Implementations; + +internal class ConnectionString : IConnectionString +{ + string IConnectionString.ConnectionString => ""; +} \ No newline at end of file diff --git a/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/Implementations/RouteRepository.cs b/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/Implementations/RouteRepository.cs index 2a4bb07..242b39c 100644 --- a/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/Implementations/RouteRepository.cs +++ b/ProjectAutoenterprise/ProjectAutoenterprise/Repositories/Implementations/RouteRepository.cs @@ -3,6 +3,13 @@ namespace ProjectAutoenterprise.Repositories.Implementations; internal class RouteRepository : IRouteRepository { + private readonly IConnectionString _connectionString; + + public RouteRepository(IConnectionString connectionString) + { + _connectionString = connectionString; + } + public void CreateRoute(Route route) { } diff --git a/ProjectAutoenterprise/ProjectAutoenterprise/appsettings.json b/ProjectAutoenterprise/ProjectAutoenterprise/appsettings.json new file mode 100644 index 0000000..e9d90f9 --- /dev/null +++ b/ProjectAutoenterprise/ProjectAutoenterprise/appsettings.json @@ -0,0 +1,15 @@ +{ + "Serilog": { + "Using": [ "Serilog.Sinks.File" ], + "MinimumLevel": "Debug", + "WriteTo": [ + { + "Name": "File", + "Args": { + "path": "Logs/autoenterprise_log.txt", + "rollingInterval": "Day" + } + } + ] + } +} \ No newline at end of file