public async Task <List <CustomerSearchRepoResponseModel> > SearchCustomers(string name) { try { return(await GetCustomers(name)); } catch (Exception ex) { _dataLogger.LogError(ex); throw; } }
public async Task <ActionResult <IEnumerable <CustomerSearchMvcResponseModel> > > Index() { _dataLogger.LogInformation("In WebUi.Controllers.CustomerSearchControllerIndex()"); try { return(View(await GetCustomers(string.Empty))); } catch (Exception ex) { _dataLogger.LogError(ex); return(BadRequest(base.GetResponseObject(Constants.ERROR_RESPONSE, Constants.ERROR_RESPONSE))); } }
public async Task <OrderRepoResponse> GetOrder(int orderId) { validateOrderId(orderId); _dataLogger.LogInformation("Input data", orderId); try { return(await GetOrderData(orderId)); } catch (Exception ex) { _dataLogger.LogError(ex); throw; } }
public async Task <List <ClientOrderRepoResponseModel> > GetClientOrders(int clientId) { validateGetClientOrders(clientId); _dataLogger.LogInformation("Input data", clientId); try { return(await GetClientOrdersSqlResults(clientId)); } catch (Exception ex) { _dataLogger.LogError(ex); throw; } }
private void LogTheException(Exception ex, IDataLogger dataLogger) { dataLogger.LogError(ex); }