public IHttpActionResult Search(SearchRequest searchRequest) { if (searchRequest == null) { return(BadRequest("Object cannot be null")); } try { return(Ok(ResourcesServices.Search(searchRequest))); } catch (Exception ex) { return(BadRequest(ex.Message)); } }