public IHttpActionResult GetTest(int subcategoryid, int categoryid) { try { test test = bllService.GetUserTest(subcategoryid, categoryid); if (test != null) { return(Ok(test)); } else { return(BadRequest("Test Not Found")); } } catch (Exception) { throw; } }