Skip to content

Sample missing call to AddMarten? #3934

@JonathanS-NTI

Description

@JonathanS-NTI

The StoreOptions sample creates a StoreOptions object but doesn't appear to pass that on to Marten.

#region sample_AddMartenByStoreOptions
var connectionString = Configuration.GetConnectionString("postgres");
// Build a StoreOptions object yourself
var options = new StoreOptions();
options.Connection(connectionString);
// In a "Production" environment, we're turning off the
// automatic database migrations and dynamic code generation
services.CritterStackDefaults(x =>
{
x.Production.GeneratedCodeMode = TypeLoadMode.Static;
x.Production.ResourceAutoCreate = AutoCreate.None;
});
#endregion
}

Should there be a call to services.AddMarten(options)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions