public HttpResponseMessage CreateMedia(MediaDto media) { var mediaRepository = new MediaRepository(); var result = mediaRepository.Create(media); if (result) { return(Request.CreateResponse(HttpStatusCode.Created)); } return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Could not create Media item at this time, try again later")); }