Exemplo n.º 1
0
 public ResponseMessageWrap <int> Update([FromBody] Paper paper)
 {
     return(new ResponseMessageWrap <int>
     {
         Body = PaperService.Update(paper)
     });
 }
Exemplo n.º 2
0
        public HttpResponseMessage Create(Guid id, PaperMetadata data)
        {
            return(WrapInTryCatch(() =>
            {
                if (!_modelValidationService.IsValidModel(data))
                {
                    throw new ArgumentNullException();
                }

                data.Id = id;
                _paperService.Update(_modelConversionService.ConvertToRepositoryModel(data));
                return new HttpResponseMessage(HttpStatusCode.Created);
            }));
        }