public BackgroundDto GetBackground(long backgroundId) { var background = _backgroundService.Find(backgroundId); if (background == null) { throw new NotFoundException(ErrorCodes.BackgroundNotFound); } if (background.IsDeleted) { throw new NotFoundException(ErrorCodes.BackgroundDeleted); } return(Mapper.Map <Background, BackgroundDto>(background)); }