/// <inheritdoc/> public Task CreateUserSessionAsync(UserSession session) { var item = new UserSessionEntity(); session.CopyTo(item); _sessionDbContext.UserSessions.Add(item); return(_sessionDbContext.SaveChangesAsync()); }
/// <inheritdoc/> public Task CreateUserSessionAsync(UserSession session, CancellationToken cancellationToken) { var item = new UserSessionEntity() { ApplicationName = _applicationDiscriminator }; session.CopyTo(item); _sessionDbContext.UserSessions.Add(item); return(_sessionDbContext.SaveChangesAsync(cancellationToken)); }