AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/persistence/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

SQL Persistence Upgrade Version 9 to 10

Component: Sql Persistence

Version 10 turns APIs that are obsolete in version 9 into errors. Endpoints that compile without obsolete warnings on the latest version 9 do not need any changes for the APIs listed in this guide.

ChangeAction required
StringBuilder overload of WriterCreatorUse the TextWriter overload

StringBuilder overload of WriterCreator

The SagaSettings.WriterCreator overload that accepts a Func<StringBuilder, JsonWriter> is obsolete with a warning starting in version 9.1 and generates an error in version 10. It will be removed in version 11.

Endpoints that do not call WriterCreator are not affected. No action is required.

Endpoints that customize the saga JSON writer with the StringBuilder overload must use the overload that accepts a Func<TextWriter, JsonWriter>, added in version 9.1, and pass the TextWriter to the JsonWriter. Affected code shows the obsolete warning CS0618 when compiled against version 9.1 or later.

Before (version 9):

var sagaSettings = persistence.SagaSettings();
sagaSettings.WriterCreator(
    writerCreator: builder =>
    {
        var writer = new StringWriter(builder);
        return new JsonTextWriter(writer)
        {
            IndentChar = '\t',
            Indentation = 1
        };
    });

After (version 10):

var sagaSettings = persistence.SagaSettings();
sagaSettings.WriterCreator(
    writerCreator: textWriter =>
    {
        return new JsonTextWriter(textWriter)
        {
            IndentChar = '\t',
            Indentation = 1
        };
    });

Related Articles

  • Saga Persister
    How sagas are persisted using SQL Persistence.
  • SQL Persistence
    A persister that targets relational databases, including SQL Server, Oracle, MySQL, PostgreSQL, AWS Aurora MySQL and AWS Aurora PostgreSQL.