public HttpResponseMessage Post(TextView view)
        {
            var model = view.getModel();
            model.created = DateTime.UtcNow;
            model.enabled = true;
            model = repo.createText(model);
            view = new TextView(model);

            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, view);
            response.Headers.Location = new Uri(Url.Link("ApiControllerAndId", new { id = view.id }));
            return response;
        }
        public HttpResponseMessage Put(TextView view)
        {
            var model = view.getModel();

            try
            {
                repo.update(model);
            }
            catch (DbUpdateConcurrencyException ex)
            {
                return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
            }

            return Request.CreateResponse(HttpStatusCode.OK);
        }