public async Task <ActionResult <SheriffTrainingDto> > AddSheriffTraining(SheriffTrainingDto sheriffTrainingDto) { await CheckForAccessToSheriffByLocation(sheriffTrainingDto.SheriffId); var sheriffTraining = sheriffTrainingDto.Adapt <SheriffTraining>(); var createdSheriffTraining = await SheriffService.AddSheriffTraining(sheriffTraining); return(Ok(createdSheriffTraining.Adapt <SheriffTrainingDto>())); }
public async Task <ActionResult <SheriffTrainingDto> > AddSheriffTraining(SheriffTrainingDto sheriffTrainingDto, bool overrideConflicts = false) { await CheckForAccessToSheriffByLocation(sheriffTrainingDto.SheriffId); var sheriffTraining = sheriffTrainingDto.Adapt <SheriffTraining>(); var createdSheriffTraining = await SheriffService.AddSheriffTraining(DutyRosterService, ShiftService, sheriffTraining, overrideConflicts); return(Ok(createdSheriffTraining.Adapt <SheriffTrainingDto>())); }