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

cleanup WithSqlServerPersistence style #26

Merged
merged 2 commits into from
Apr 6, 2022
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static AkkaConfigurationBuilder WithSqlServerPersistence(this AkkaConfigu
string connectionString, SqlPersistenceMode mode = SqlPersistenceMode.Both)
{
Config journalConfiguration = @$"
akka.persistence{{
akka.persistence {{
journal {{
plugin = ""akka.persistence.journal.sql-server""
sql-server {{
Expand All @@ -47,19 +47,19 @@ class = ""Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence.
}}
}}";

Config snapshotStoreConfig = $@"
akka.persistence {{
Config snapshotStoreConfig = @$"
akka.persistence {{
snapshot-store {{
plugin = ""akka.persistence.snapshot-store.sql-server""
sql-server {{
class = ""Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore, Akka.Persistence.SqlServer""
schema-name = dbo
table-name = SnapshotStore
auto-initialize = on
connection-string = """ + connectionString + @"""
schema-name = dbo
table-name = SnapshotStore
auto-initialize = on
connection-string = ""{connectionString}""
}}
}}
}}";
}}";

var finalConfig = journalConfiguration;

Expand All @@ -82,4 +82,4 @@ class = ""Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore, Akka.Persi
return builder.AddHocon(finalConfig.WithFallback(SqlServerPersistence.DefaultConfiguration()));
}
}
}
}