public async Task <AppointmentDto> RemoveSectionAsync(AppointmentRemoveSectionDto removeSectionDto) { RemoveSection.Command command = _mapper.Map <RemoveSection.Command>(removeSectionDto); await _mediator.Send(command); return(await GetByIdAsync(removeSectionDto.Id)); }
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); }
public async Task <ActionResult <AppointmentDto> > RemoveSection([FromRoute] AppointmentRemoveSectionDto removeSectionDto) { return(await _appointmentService.RemoveSectionAsync(removeSectionDto)); }