public IActionResult Put(PersonDetailAccomplishmentViewModel model)
 {
     if (ModelState.IsValid)
     {
         var result = _accomplishment.Edit(model);
         if (result != null)
         {
             return(Ok(result));
         }
     }
     return(BadRequest());
 }
        public async Task <IActionResult> Edit([FromForm] PersonDetailAccomplishmentViewModel model, int id)
        {
            if (ModelState.IsValid && model.PersonId == id)
            {
                model = _accomplishment.Edit(model);

                var person = new Person
                {
                    LastName = model.LastName,
                    State    = model.State
                };

                var authResult = await _service.AuthorizeAsync(User, person, "CanEditContent");

                if (!authResult.Succeeded)
                {
                    return(new ForbidResult());
                }
            }
            return(View(model));
        }