예제 #1
0
        public ActionResult <int> Post([FromBody] CreateProfileDTO request)
        {
            var command = new CreateProfileCommand(_mapper.Map <Data.Models.Profile>(request));
            var handler = _commandHandler.Build(command);

            return(Ok(handler.Execute()));
        }
        public async Task <ActionResult> Create(CreateProfileDTO createProfileDTO)
        {
            Core.Domain.Entities.Profile objProfile = _mapper.Map <Core.Domain.Entities.Profile>(createProfileDTO);
            await _profileService.Create(objProfile);

            return(Ok());
        }