public VacancyToken GenerateVacancyToken(int vacancyId) { Require.Positive(vacancyId, nameof(vacancyId)); var newToken = new VacancyToken(); newToken.VacancyId = vacancyId; newToken.Token = TokenGenerator.GenerateToken(); _projectRepository.SaveVacancyToken(newToken); return(newToken); }
public void RemoveVacancyToken(VacancyToken vacToken) { Require.NotNull(vacToken, nameof(vacToken)); _projectRepository.RemoveVacancyToken(vacToken); }