public async Task <ActionResult <SheriffAwayLocationDto> > AddSheriffAwayLocation(SheriffAwayLocationDto sheriffAwayLocationDto) { var sheriffAwayLocation = sheriffAwayLocationDto.Adapt <SheriffAwayLocation>(); var createdSheriffAwayLocation = await _service.AddSheriffAwayLocation(sheriffAwayLocation); return(Ok(createdSheriffAwayLocation)); }
public async Task <ActionResult <SheriffAwayLocationDto> > AddSheriffAwayLocation(SheriffAwayLocationDto sheriffAwayLocationDto) { await CheckForAccessToSheriffByLocation(sheriffAwayLocationDto.SheriffId); var sheriffAwayLocation = sheriffAwayLocationDto.Adapt <SheriffAwayLocation>(); var createdSheriffAwayLocation = await SheriffService.AddSheriffAwayLocation(sheriffAwayLocation); return(Ok(createdSheriffAwayLocation.Adapt <SheriffAwayLocationDto>())); }
public async Task <ActionResult <SheriffAwayLocationDto> > AddSheriffAwayLocation(SheriffAwayLocationDto sheriffAwayLocationDto, bool overrideConflicts = false) { await CheckForAccessToSheriffByLocation(sheriffAwayLocationDto.SheriffId); var sheriffAwayLocation = sheriffAwayLocationDto.Adapt <SheriffAwayLocation>(); var createdSheriffAwayLocation = await SheriffService.AddSheriffAwayLocation(DutyRosterService, ShiftService, sheriffAwayLocation, overrideConflicts); return(Ok(createdSheriffAwayLocation.Adapt <SheriffAwayLocationDto>())); }