Exemple #1
0
        public async Task <IHttpActionResult> PutDocument(string id, Document document)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != document.DocumentId)
            {
                return(BadRequest());
            }

            docService.Update(document);
            docService.CommitAsync();

            return(StatusCode(HttpStatusCode.NoContent));
        }