예제 #1
0
        public async Task <IActionResult> Post([FromBody] PeopleCommand command)
        {
            var person = new Person(command);

            person.ChangePhoto(peopleOpts.Value.DefaultUrlImage);

            await peopleRepository.AddAsync(person);

            var location = $"{Request.Path}/api/v1/people/{person.Id}";

            return(Created(location, person));
        }