Beispiel #1
0
        public bool Handle(UpdatePersonalDetailsCommand cmd)
        {
            ScreenName = cmd.ScreenName;
            FirstName  = cmd.FirstName;
            LastName   = cmd.LastName;

            return(ScreenName == cmd.ScreenName && FirstName == cmd.FirstName && LastName == cmd.LastName);
        }
        public async Task <IActionResult> UpdatePersonalDetails(string profileId, [FromBody] UpdatePersonalDetailsCommand dto)
        {
            dto.ProfileId = profileId;

            var result = await _mediator.Send(dto);

            if (string.IsNullOrEmpty(result))
            {
                return(NotFound());
            }

            var profile = await _mediator.Send(new GetAppProfileByProfileIdQuery(profileId));

            return(Ok(profile));
        }
Beispiel #3
0
 public bool Handle(UpdatePersonalDetailsCommand cmd) => PersonalDetails.Handle(cmd);
Beispiel #4
0
        public async Task <UpdateResult> Put([FromBody] UpdatePersonalDetailsCommand command)
        {
            UpdateResult result = await _commandExecuter.ExecuteAsync(command);

            return(result);
        }