public async Task <IActionResult> GetProducts() { List <ProductDTO> productDTOs; try { List <Product> products = await _productBLL.GetProducts(); productDTOs = _mapper.Map <List <ProductDTO> >(products); } catch (Exception ex) { throw ex; } return(base.Ok(productDTOs)); }