Ejemplo n.º 1
0
        public async Task <ActionResult <FamilyTreeDto> > PostFamilyTree(FamilyTreeDto dataDto)
        {
            var data   = _mapper.MapFromDto <FamilyTreeDto, Entity.FamilyTree>(dataDto);
            var result = await _service.CreateFamilyTreeAsync(data);

            return(new ObjectResult(new
            {
                FamilyTreeCreate = _mapper.MapToDto <Entity.FamilyTree, FamilyTreeDto>(result)
            }));
        }