LabWork 2.0.1 (Подключение библиотек)
This commit is contained in:
parent
7d0cf17990
commit
85cf278f62
@ -145,7 +145,6 @@
|
|||||||
private Label label1;
|
private Label label1;
|
||||||
private Label label2;
|
private Label label2;
|
||||||
private Label label3;
|
private Label label3;
|
||||||
private NumericUpDown numericUpDown1;
|
|
||||||
private DateTimePicker dateTimePickerRepairDate;
|
private DateTimePicker dateTimePickerRepairDate;
|
||||||
private TextBox textBoxDescription;
|
private TextBox textBoxDescription;
|
||||||
private Button buttonCancel;
|
private Button buttonCancel;
|
||||||
|
@ -26,6 +26,8 @@ namespace ProjectAutoenterprise
|
|||||||
container.RegisterType<IEmployeeRepository, EmployeeRepository>(new TransientLifetimeManager());
|
container.RegisterType<IEmployeeRepository, EmployeeRepository>(new TransientLifetimeManager());
|
||||||
container.RegisterType<IItineraryRepository, ItineraryRepository>(new TransientLifetimeManager());
|
container.RegisterType<IItineraryRepository, ItineraryRepository>(new TransientLifetimeManager());
|
||||||
container.RegisterType<IRouteRepository, RouteRepository>(new TransientLifetimeManager());
|
container.RegisterType<IRouteRepository, RouteRepository>(new TransientLifetimeManager());
|
||||||
|
|
||||||
|
container.RegisterType<IConnectionString, ConnectionString>(new TransientLifetimeManager());
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,17 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Dapper" Version="2.1.35" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
|
||||||
|
<PackageReference Include="Serilog" Version="4.1.0" />
|
||||||
|
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.4" />
|
||||||
|
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||||
|
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" />
|
||||||
<PackageReference Include="Unity" Version="5.11.10" />
|
<PackageReference Include="Unity" Version="5.11.10" />
|
||||||
|
<PackageReference Include="Unity.Microsoft.Logging" Version="5.11.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -27,4 +37,10 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="appsettings.json">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -0,0 +1,6 @@
|
|||||||
|
namespace ProjectAutoenterprise.Repositories;
|
||||||
|
|
||||||
|
internal interface IConnectionString
|
||||||
|
{
|
||||||
|
string ConnectionString { get; }
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
namespace ProjectAutoenterprise.Repositories.Implementations;
|
||||||
|
|
||||||
|
internal class ConnectionString : IConnectionString
|
||||||
|
{
|
||||||
|
string IConnectionString.ConnectionString => "";
|
||||||
|
}
|
@ -3,6 +3,13 @@ namespace ProjectAutoenterprise.Repositories.Implementations;
|
|||||||
|
|
||||||
internal class RouteRepository : IRouteRepository
|
internal class RouteRepository : IRouteRepository
|
||||||
{
|
{
|
||||||
|
private readonly IConnectionString _connectionString;
|
||||||
|
|
||||||
|
public RouteRepository(IConnectionString connectionString)
|
||||||
|
{
|
||||||
|
_connectionString = connectionString;
|
||||||
|
}
|
||||||
|
|
||||||
public void CreateRoute(Route route)
|
public void CreateRoute(Route route)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
15
ProjectAutoenterprise/ProjectAutoenterprise/appsettings.json
Normal file
15
ProjectAutoenterprise/ProjectAutoenterprise/appsettings.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"Serilog": {
|
||||||
|
"Using": [ "Serilog.Sinks.File" ],
|
||||||
|
"MinimumLevel": "Debug",
|
||||||
|
"WriteTo": [
|
||||||
|
{
|
||||||
|
"Name": "File",
|
||||||
|
"Args": {
|
||||||
|
"path": "Logs/autoenterprise_log.txt",
|
||||||
|
"rollingInterval": "Day"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user