.
This commit is contained in:
parent
0d96bd546e
commit
b7e7f0d909
@ -16,7 +16,7 @@ namespace BankYouBankruptDatabaseImplement
|
|||||||
if (!optionsBuilder.IsConfigured)
|
if (!optionsBuilder.IsConfigured)
|
||||||
{
|
{
|
||||||
//optionsBuilder.UseSqlServer(@"Data Source=SHADOWIK\SHADOWIK;Initial Catalog=BankYouBankrupt;Integrated Security=True;TrustServerCertificate=True");
|
//optionsBuilder.UseSqlServer(@"Data Source=SHADOWIK\SHADOWIK;Initial Catalog=BankYouBankrupt;Integrated Security=True;TrustServerCertificate=True");
|
||||||
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-CFLH20EE\SQLEXPRESS;Initial Catalog=BankYouBankrupt;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-CFLH20EE\SQLEXPRESS;Initial Catalog=BankYouBankrupt;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
||||||
}
|
}
|
||||||
base.OnConfiguring(optionsBuilder);
|
base.OnConfiguring(optionsBuilder);
|
||||||
}
|
}
|
||||||
|
@ -18,11 +18,14 @@ namespace BankYouBankruptRestApi.Controllers
|
|||||||
|
|
||||||
private readonly IDebitingLogic _debitingLogic;
|
private readonly IDebitingLogic _debitingLogic;
|
||||||
|
|
||||||
public CardController(ICardLogic cardLogic, IDebitingLogic debitingLogic, ILogger<ClientController> logger)
|
private readonly ICreditingLogic _creditingLogic;
|
||||||
|
|
||||||
|
public CardController(ICardLogic cardLogic, IDebitingLogic debitingLogic, ICreditingLogic creditingLogic, ILogger<ClientController> logger)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_cardLogic = cardLogic;
|
_cardLogic = cardLogic;
|
||||||
_debitingLogic = debitingLogic;
|
_debitingLogic = debitingLogic;
|
||||||
|
_creditingLogic = creditingLogic;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
@ -61,7 +64,18 @@ namespace BankYouBankruptRestApi.Controllers
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_logger.LogError(ex, "Ошибка создания на снятие наличных");
|
_logger.LogError(ex, "Ошибка создания запроса на снятие наличных");
|
||||||
|
Response.StatusCode = (int)HttpStatusCode.NotAcceptable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public void CreateCreditingOperation(CreditingBindingModel model) {
|
||||||
|
try {
|
||||||
|
_creditingLogic.Create(model);
|
||||||
|
}
|
||||||
|
catch (Exception ex) {
|
||||||
|
_logger.LogError(ex, "Ошибка создания операции на пополнение");
|
||||||
Response.StatusCode = (int)HttpStatusCode.NotAcceptable;
|
Response.StatusCode = (int)HttpStatusCode.NotAcceptable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user