예제 #1
0
        public async Task <IActionResult> EditPerson(int id, [FromBody] AddPersonRequests request)
        {
            var person = request.ToDto(id);
            await _personManager.EditPersonAsync(person);

            return(Created(Request.Path, person.WrapResponse(Request.Path)));
        }
예제 #2
0
        public async Task <IActionResult> AddPerson([FromBody] AddPersonRequests request)
        {
            var person = request.ToDto();
            await _personManager.AddPersonAsync(person);

            return(Created(Request.Path, person));
        }