public void for_connection_string() { var options = SessionOptions.ForConnectionString(ConnectionSource.ConnectionString); options.Connection.ConnectionString.ShouldBe(ConnectionSource.ConnectionString); options.Connection.State.ShouldBe(ConnectionState.Closed); options.OwnsConnection.ShouldBeTrue(); options.OwnsTransactionLifecycle.ShouldBeTrue(); }
public static async Task open_it() { using var store = DocumentStore.For(opts => { opts.Connection("some connection string"); }); #region sample_opening_session_async await using var session = await store.OpenSessionAsync(SessionOptions.ForConnectionString("another connection string")); var openIssues = await session.Query <Issue>() .Where(x => x.Tags.Contains("open")) .ToListAsync(); #endregion }