public IActionResult GetCataloguesByCustomerId(int customerId) { if (customerId == null) { return(BadRequest()); } var results = catalogueSvc.GetCataloguesByCustomerId(customerId); if (results != null) { return(Ok(mapper.Map <IEnumerable <Ocuco.DataModel.Catalog.Entities.Catalogue>, IEnumerable <CatalogueViewModel> >(results))); } return(NotFound()); }