Contracktor: merge
This commit is contained in:
commit
884a3692c9
@ -3,6 +3,7 @@ using ComputerStoreContracts.BusinessLogicContracts;
|
||||
using ComputerStoreContracts.SearchModels;
|
||||
using ComputerStoreContracts.ViewModels;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Windows;
|
||||
|
||||
namespace ComputerStoreRestAPI.Controllers
|
||||
{
|
||||
@ -54,7 +55,7 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
{
|
||||
return _componentLogic.ReadList(null);
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Receiving list of components error.");
|
||||
throw;
|
||||
@ -66,7 +67,7 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
return _componentLogic.ReadElement(new ComponentSearchModel { ID = id } );
|
||||
return _componentLogic.ReadElement(new ComponentSearchModel { ID = id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -82,7 +83,7 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
{
|
||||
return _componentLogic.Delete(new ComponentBindingModel { ID = id });
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Removing component error.");
|
||||
throw;
|
||||
@ -110,7 +111,7 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
{
|
||||
return _componentLogic.Create(component);
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Inserting component error.");
|
||||
throw;
|
||||
@ -192,7 +193,7 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
return _pcLogic.Delete(new PCBindingModel { ID = id});
|
||||
return _pcLogic.Delete(new PCBindingModel { ID = id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -234,7 +235,7 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
return _requestComponentLogic.ReadList(new RequestSearchModel { ID = id});
|
||||
return _requestComponentLogic.ReadList(new RequestSearchModel { ID = id });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@ -316,8 +317,8 @@ namespace ComputerStoreRestAPI.Controllers
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Request
|
||||
[HttpGet]
|
||||
#region Request
|
||||
[HttpGet]
|
||||
public List<RequestViewModel>? GetRequestList()
|
||||
{
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user