fix BankRestApi.Program, add dependency injection
This commit is contained in:
parent
e3c55f7c65
commit
1a25fc7b93
@ -12,7 +12,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace BankDatabaseImplement.Implements
|
||||
{
|
||||
internal class AccountStorage : IAccountStorage
|
||||
public class AccountStorage : IAccountStorage
|
||||
{
|
||||
public List<AccountViewModel> GetFullList()
|
||||
{
|
||||
|
@ -12,13 +12,29 @@ builder.Logging.AddLog4Net("log4net.config");
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddTransient<IClientStorage, ClientStorage>();
|
||||
builder.Services.AddTransient<ICardStorage, CardStorage>();
|
||||
builder.Services.AddTransient<IOperationStorage, OperationStorage>();
|
||||
builder.Services.AddTransient<IRequestStorage, RequestStorage>();
|
||||
builder.Services.AddTransient<IClientLogic, ClientLogic>();
|
||||
|
||||
builder.Services.AddTransient<IManagerStorage, ManagerStorage>();
|
||||
builder.Services.AddTransient<IManagerLogic, ManagerLogic>();
|
||||
|
||||
builder.Services.AddTransient<ICardStorage, CardStorage>();
|
||||
builder.Services.AddTransient<ICardLogic, CardLogic>();
|
||||
|
||||
builder.Services.AddTransient<IAccountStorage, AccountStorage>();
|
||||
builder.Services.AddTransient<IAccountLogic, AccountLogic>();
|
||||
|
||||
builder.Services.AddTransient<IOperationStorage, OperationStorage>();
|
||||
builder.Services.AddTransient<IOperationLogic, OperationLogic>();
|
||||
|
||||
builder.Services.AddTransient<ITransferStorage, TransferStorage>();
|
||||
builder.Services.AddTransient<ITransferLogic, TransferLogic>();
|
||||
|
||||
builder.Services.AddTransient<IRequestStorage, RequestStorage>();
|
||||
builder.Services.AddTransient<IRequestLogic, RequestLogic>();
|
||||
|
||||
builder.Services.AddTransient<IWithdrawalStorage, WithdrawalStorage>();
|
||||
builder.Services.AddTransient<IWithdrawalLogic, WithdrawalLogic>();
|
||||
|
||||
builder.Services.AddLogging(option =>
|
||||
{
|
||||
option.SetMinimumLevel(LogLevel.Information);
|
||||
|
Loading…
Reference in New Issue
Block a user