private async Task <RefreshToken> GerarRefreshToken(string email) { var refreshToken = new RefreshToken { Username = email, ExpirationDate = DateTime.UtcNow.AddHours(/*_appTokenSettingsSettings.RefreshTokenExpiration*/ 3) }; _context.refresh_token.RemoveRange(_context.refresh_token.Where(u => u.Username == email)); await _context.refresh_token.AddAsync(refreshToken); await _context.SaveChangesAsync(); return(refreshToken); }
public virtual async Task SaveChangesAsync() { await Db.SaveChangesAsync().ConfigureAwait(false); }