public QueryTestBase() { _databaseName = Guid.NewGuid().ToString(); using (var session = new UserQuerySession(_databaseName, null)) { UserSveta = session.CreateUser("Света", "svetika", "pass", false); UserEvgeny = session.CreateUser("Евгений", "evgen", "password", true); } DefaultUser = UserSveta; }
protected async Task <UserQuerySession> CreateSession(User user, EntityIdSet idSet = null) { if (user == null) { throw new ArgumentNullException(nameof(user)); } var session = new UserQuerySession(_databaseName, user); if (idSet == null) { return(session); } await session.LoadDefaultEntities(idSet); return(session); }