예제 #1
0
        /// <inheritdoc/>
        public Task CreateUserSessionAsync(UserSession session)
        {
            var item = new UserSessionEntity();

            session.CopyTo(item);
            _sessionDbContext.UserSessions.Add(item);
            return(_sessionDbContext.SaveChangesAsync());
        }
예제 #2
0
        /// <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));
        }