Что то типо мейн контроллер
This commit is contained in:
parent
ee8b4dda04
commit
a0d6210f7e
@ -142,6 +142,7 @@ namespace BankRestApi.Controllers
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void CreateClient(ClientBindingModel model)
|
||||
{
|
||||
@ -194,6 +195,7 @@ namespace BankRestApi.Controllers
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPut]
|
||||
public void UpdateClient(ClientBindingModel model)
|
||||
{
|
||||
@ -246,5 +248,58 @@ namespace BankRestApi.Controllers
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
[HttpDelete]
|
||||
public void DeleteClient(ClientBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_client.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления клиента");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteCard(CardBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_card.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления карты");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteOperation(OperationBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_operation.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления операции");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
[HttpDelete]
|
||||
public void DeleteRequest(RequestBindingModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
_request.Delete(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Ошибка удаления запроса");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user