コード例 #1
0
 public IActionResult Post([FromBody] PersonVO person)
 {
     if (person.IsNull())
     {
         return(BadRequest());
     }
     return(new ObjectResult(_personBusiness.Create(person)));
 }
コード例 #2
0
        // PUT api/values/5
        public IActionResult Put([FromBody] PersonVO person)
        {
            if (person == null)
            {
                return(BadRequest());
            }

            person = _personBusiness.Update(person);
            if (person.IsNull())
            {
                return(NotFound());
            }
            return(new ObjectResult(person));
        }