public IHttpActionResult GetUser(string id) { UserTable userObj = null; try { userObj = userdetails.Get(id); if (userObj == null) { return(NotFound()); } } catch (Exception ex) { throw ex; } return(Ok(userObj)); }