Пример #1
0
        public ActionResult <PeopleReadDto> CreatePeople(PeopleCreateDto peopleCreateDto)
        {
            var people = _mapper.Map <People>(peopleCreateDto);

            _repository.CreatePeople(people);
            _repository.SaveChanges();

            //var peopleReadDto = _mapper.Map<PeopleReadDto>(people);

            return(NoContent());//CreatedAtRoute(nameof(GetPeopleById), new { Id = peopleReadDto.Id }, peopleReadDto);
        }