コード例 #1
0
        public void partial_update_updates_value()
        {
            var newName  = "updated name";
            var updateId = 4;
            var model    = new JsonPatchDocument <ValueUpdateDto>();

            model.Add("Name", newName);

            var updated = _fcd.Update(updateId, model).Result;

            updated.Name.ShouldBe(newName);

            var value = _fcd.Get(updateId).Result;

            value.Name.ShouldBe(newName);
        }
コード例 #2
0
        public async Task <IHttpActionResult> Put(int id, [FromBody] ValueWriteDto value)
        {
            var updated = _valuesFcd.Update(id, value);

            return(Ok(await updated));
        }