public async Task <IActionResult> GetWarehouses([FromBody] ProductGroupWarehouseGetRequest request) { try { var response = await _productGroupAppService.SearchWarehouses(request); return(Json(response)); } catch (Exception e) { _logger.LogError(e, Common.Common.GetMethodName(), request); throw; } }
public async Task <IActionResult> GetWarehousesConfig([FromBody] ProductGroupWarehouseGetRequest request) { try { ProductGroupWarehouseGetResponse response = new ProductGroupWarehouseGetResponse(); ValidationResult validate = ProductGroupConditionGetRequestValidator.ValidateModel(request); if (validate.IsValid) { response = await _productGroupAppService.GetWarehouses(request); } else { response.SetFail(validate.Errors.Select(p => p.ToString())); } return(Json(response)); } catch (Exception e) { _logger.LogError(e, Common.Common.GetMethodName(), request); throw; } }