Skip to content

Commit

Permalink
cleanup WithSqlServerPersistence style (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
CumpsD authored Apr 6, 2022
1 parent 2e55012 commit 50c1483
Showing 1 changed file with 9 additions and 9 deletions.
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()));
}
}
}
}

0 comments on commit 50c1483

Please sign in to comment.