public HttpResponseMessage GetAllImages() { try { List <ImageModel> images = imagelogic.GetAllImagess(); return(Request.CreateResponse(HttpStatusCode.OK, images)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } }