Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to use ResetAllMartenDataAsync() #3554

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/schema/cleaning.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public async Task clean_out_database_documents(IHost host)

## Reset all data

Use `IDocumentStore.Advanced.ResetAllData()` to deletes all current document, event data and then (re)applies the configured initial data.
Use `IDocumentStore.Advanced.ResetAllData()` to delete all current document and event data, and then (re)apply the configured initial data.

<!-- snippet: sample_reset_all_data -->
<a id='snippet-sample_reset_all_data'></a>
Expand All @@ -81,7 +81,7 @@ await theStore.Advanced.ResetAllData();
<sup><a href='https://github.com/JasperFx/marten/blob/master/src/DocumentDbTests/SessionMechanics/reset_all_data_usage.cs#L45-L49' title='Snippet source file'>snippet source</a> | <a href='#snippet-sample_reset_all_data' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

Use `IHost.ResetAllMartenDataAsync()` to delete all current document, event data and then (re)applies the configured initial data from the `IHost` instance.
Use `IHost.ResetAllMartenDataAsync()` to delete all current document and event data, restart the AsyncDaemon if it us running, and then (re)apply the configured initial data from the `IHost` instance.

<!-- snippet: sample_reset_all_data_ihost -->
<a id='snippet-sample_reset_all_data_ihost'></a>
Expand Down
5 changes: 3 additions & 2 deletions docs/testing/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ public abstract class IntegrationContext : IAsyncLifetime

public async Task InitializeAsync()
{
// Using Marten, wipe out all data and reset the state
await Store.Advanced.ResetAllData();
// Using Marten, wipe out all data and reset the state.
// Also restart the async daemon if in use.
await Host.ResetAllMartenDataAsync();
}

// This is required because of the IAsyncLifetime
Expand Down