Skip to content

Commit

Permalink
Migrate to sql database (part 4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryba1986 committed Jul 6, 2022
1 parent 37757de commit e89632f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 22 deletions.
9 changes: 5 additions & 4 deletions src/Zeus.Api.Client/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
"Key": "gh9gy93434758y5t72893b6vg293btv78y7896tv235bc64bc5r7rv4577756GRG34g",
"ExpireMinutes": 250
},
"Mongo": {
"Sql": {
"Server": "127.0.0.1",
"Port": 27017,
"ReplicaSetName": "rs0",
"Port": 1433,
"Database": "Zeus",
"Username": "Zeus",
"Password": "Zeus"
"Password": "Zeus",
"Encrypt": false,
"CommandTimeout": 120
},
"Zeus": {
"LocationLimit": 0
Expand Down
9 changes: 5 additions & 4 deletions src/Zeus.Api.Client/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
"Key": "f318c1d79a224a5da54a0b33f6dd503179eb2546f95738c65702df6272e735546501f0dab96870bd2f3bcc458499c774",
"ExpireMinutes": 10
},
"Mongo": {
"Sql": {
"Server": "127.0.0.1",
"Port": 27017,
"ReplicaSetName": "rs0",
"Port": 1433,
"Database": "Zeus",
"Username": "Zeus",
"Password": "Zeus"
"Password": "Zeus",
"Encrypt": false,
"CommandTimeout": 120
},
"Zeus": {
"LocationLimit": 0
Expand Down
11 changes: 6 additions & 5 deletions src/Zeus.Api.Web/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
"Key": "gh9gy93434758y5t72893b6vg293btv78y7896tv235bc64bc5r7rv4577756GRG34g",
"ExpireMinutes": 250
},
"Mongo": {
"Server": "127.0.0.1",
"Port": 27017,
"ReplicaSetName": "rs0",
"Sql": {
"Server": "axel2001.host1.eu",
"Port": 1433,
"Database": "Zeus",
"Username": "Zeus",
"Password": "Zeus"
"Password": "Zeus",
"Encrypt": false,
"CommandTimeout": 120
},
"Zeus": {
"LocationLimit": 1000
Expand Down
9 changes: 5 additions & 4 deletions src/Zeus.Api.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
"Key": "4a7dff5f42ce4da853f583e2c810b7af4bf71921988b296c5fd153317094950d85d497e4d94efa596b3d4d2f46129ca3",
"ExpireMinutes": 10
},
"Mongo": {
"Sql": {
"Server": "127.0.0.1",
"Port": 27017,
"ReplicaSetName": "rs0",
"Port": 1433,
"Database": "Zeus",
"Username": "Zeus",
"Password": "Zeus"
"Password": "Zeus",
"Encrypt": false,
"CommandTimeout": 120
},
"Zeus": {
"LocationLimit": 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected override void Load(ContainerBuilder builder)
.SingleInstance();

builder
.RegisterInstance(_configuration.GetSettings<MongoSettings>())
.RegisterInstance(_configuration.GetSettings<SqlSettings>())
.SingleInstance();

builder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
namespace Zeus.Infrastructure.Settings
{
internal sealed class MongoSettings
internal sealed class SqlSettings
{
public string Server { get; init; }
public ushort Port { get; init; }
public string ReplicaSetName { get; init; }
public string Database { get; init; }
public string Username { get; init; }
public string Password { get; init; }
public bool Encrypt { get; init; }
public ushort CommandTimeout { get; init; }

public MongoSettings()
public SqlSettings()
{
Server = string.Empty;
ReplicaSetName = string.Empty;
Database = string.Empty;
Username = string.Empty;
Password = string.Empty;
Expand Down

0 comments on commit e89632f

Please sign in to comment.