예제 #1
0
        public async Task <AppointmentDto> RemoveSectionAsync(AppointmentRemoveSectionDto removeSectionDto)
        {
            RemoveSection.Command command = _mapper.Map <RemoveSection.Command>(removeSectionDto);
            await _mediator.Send(command);

            return(await GetByIdAsync(removeSectionDto.Id));
        }
예제 #2
0
        public void Should_Map()
        {
            // Arrange
            var dto = new AppointmentRemoveSectionDto
            {
                Id        = Guid.NewGuid(),
                SectionId = Guid.NewGuid()
            };

            // Act
            RemoveSection.Command command = _mapper.Map <RemoveSection.Command>(dto);

            // Assert
            command.Should().BeEquivalentTo(dto);
        }
예제 #3
0
 public async Task <ActionResult <AppointmentDto> > RemoveSection([FromRoute] AppointmentRemoveSectionDto removeSectionDto)
 {
     return(await _appointmentService.RemoveSectionAsync(removeSectionDto));
 }