public HttpResponseMessage Get() { try { var provider = new PackageProvider(DbInfo); return(Request.CreateResponse(HttpStatusCode.OK, provider.RetrievePackages())); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message)); } }