コード例 #1
0
        private bool HasCode(int userId, string email, int code)
        {
            EmailVerifies emailVerifier = emailVerifierRepository
                                          .GetWhere(e => IsRequestedEmailVerifier(e, userId, email)).FirstOrDefault();

            if (emailVerifier == null)
            {
                throw new ArgumentNullException();
            }

            return(emailVerifier.Equals(userId, email, code));
        }
コード例 #2
0
ファイル: VerificationCleaner.cs プロジェクト: SGmuwa/InWords
 public async Task ClearUserVereficationsStory(int userId)
 {
     IEnumerable <EmailVerifies> verifications = emailVerifierRepository.GetWhere(e => e.UserId == userId);
     await emailVerifierRepository.Remove(verifications.ToArray());
 }