PIbd-22 Pyzhov E.A. LabWork01 #1
@ -32,4 +32,10 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="appsettings.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -29,6 +29,8 @@ namespace ITServiceManager
|
||||
container.RegisterType<IEmployeeRepository, EmployeeRepository>();
|
||||
container.RegisterType<ICompanyRepository, CompanyRepository>();
|
||||
|
||||
container.RegisterType<IConnectionString, ConnectionString>();
|
||||
|
||||
return container;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
namespace ITServiceManager.Repositories;
|
||||
|
||||
public interface IConnectionString
|
||||
{
|
||||
public string ConnectionString { get; }
|
||||
}
|
@ -4,6 +4,12 @@ namespace ITServiceManager.Repositories.Implementations;
|
||||
|
||||
public class CompanyRepository : ICompanyRepository
|
||||
{
|
||||
private readonly IConnectionString _connectionString;
|
||||
|
||||
public CompanyRepository(IConnectionString connectionString)
|
||||
{
|
||||
_connectionString = connectionString;
|
||||
}
|
||||
public IEnumerable<Company> ReadCompanies()
|
||||
{
|
||||
return [];
|
||||
|
@ -0,0 +1,6 @@
|
||||
namespace ITServiceManager.Repositories.Implementations;
|
||||
|
||||
internal class ConnectionString : IConnectionString
|
||||
{
|
||||
string IConnectionString.ConnectionString => "";
|
||||
}
|
3
ITServiceManager/ITServiceManager/appsettings.json
Normal file
3
ITServiceManager/ITServiceManager/appsettings.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user