Skip to content

Commit 8e6b438

Browse files
committed
#22 init for mongo provider
1 parent 8a01e6a commit 8e6b438

40 files changed

+299
-163
lines changed

netcorekit.sln

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protos", "protos", "{B955EE
6868
samples\protos\project.proto = samples\protos\project.proto
6969
EndProjectSection
7070
EndProject
71+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetCoreKit.Infrastructure.Mongo", "src\NetCoreKit.Infrastructure.Mongo\NetCoreKit.Infrastructure.Mongo.csproj", "{BAAB999F-EF03-4575-8FD4-9989A544319E}"
72+
EndProject
7173
Global
7274
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7375
Debug|Any CPU = Debug|Any CPU
@@ -220,6 +222,14 @@ Global
220222
{94E34AF7-42CA-4BBC-B444-FC17915B4D55}.Release|Any CPU.Build.0 = Release|Any CPU
221223
{94E34AF7-42CA-4BBC-B444-FC17915B4D55}.Release|x86.ActiveCfg = Release|Any CPU
222224
{94E34AF7-42CA-4BBC-B444-FC17915B4D55}.Release|x86.Build.0 = Release|Any CPU
225+
{BAAB999F-EF03-4575-8FD4-9989A544319E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
226+
{BAAB999F-EF03-4575-8FD4-9989A544319E}.Debug|Any CPU.Build.0 = Debug|Any CPU
227+
{BAAB999F-EF03-4575-8FD4-9989A544319E}.Debug|x86.ActiveCfg = Debug|Any CPU
228+
{BAAB999F-EF03-4575-8FD4-9989A544319E}.Debug|x86.Build.0 = Debug|Any CPU
229+
{BAAB999F-EF03-4575-8FD4-9989A544319E}.Release|Any CPU.ActiveCfg = Release|Any CPU
230+
{BAAB999F-EF03-4575-8FD4-9989A544319E}.Release|Any CPU.Build.0 = Release|Any CPU
231+
{BAAB999F-EF03-4575-8FD4-9989A544319E}.Release|x86.ActiveCfg = Release|Any CPU
232+
{BAAB999F-EF03-4575-8FD4-9989A544319E}.Release|x86.Build.0 = Release|Any CPU
223233
EndGlobalSection
224234
GlobalSection(SolutionProperties) = preSolution
225235
HideSolutionNode = FALSE
@@ -245,6 +255,7 @@ Global
245255
{02E8D785-5013-47B2-BFC6-371874C8BA64} = {92D6FD73-B95C-4CBB-A48E-047672EB4E77}
246256
{94E34AF7-42CA-4BBC-B444-FC17915B4D55} = {6CF50533-EBD6-47B1-9AD9-9EBBFF3AC887}
247257
{B955EE6A-DBD9-474A-AE34-E1960E887F0F} = {92D6FD73-B95C-4CBB-A48E-047672EB4E77}
258+
{BAAB999F-EF03-4575-8FD4-9989A544319E} = {6CF50533-EBD6-47B1-9AD9-9EBBFF3AC887}
248259
EndGlobalSection
249260
GlobalSection(ExtensibilityGlobals) = postSolution
250261
SolutionGuid = {B9325AE8-21A8-4D46-9B04-38BD2BC35C0F}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/sh
2-
set -e
3-
set -x
2+
set -ex
43

54
export ASPNETCORE_ENVIRONMENT Development
65
dotnet build
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
set -ex
3+
4+
TAG=${TAG:=$(git rev-parse --short HEAD)}
5+
NAMESPACE=${NAMESPACE:="vndg"}
6+
7+
echo "namespace: ${NAMESPACE} and tag: ${TAG}"
8+
echo "start to build TodoApi..."
9+
10+
docker build -f samples/TodoApi/Dockerfile -t vndg/todoapi:$TAG -t vndg/todoapi:latest .
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
2-
set -e
3-
set -x
2+
set -ex
43

54
dotnet run

samples/TodoApi/Startup.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Microsoft.AspNetCore.Builder;
22
using Microsoft.Extensions.DependencyInjection;
33
using NetCoreKit.Infrastructure.AspNetCore.Miniservice;
4+
using NetCoreKit.Infrastructure.Bus;
45
using NetCoreKit.Infrastructure.Bus.Kafka;
56
using NetCoreKit.Infrastructure.Bus.Redis;
67
using NetCoreKit.Infrastructure.EfCore;
@@ -21,11 +22,12 @@ public void ConfigureServices(IServiceCollection services)
2122
//svc.AddEfSqlLiteDb();
2223
svc.AddEfCoreMySqlDb();
2324
//svc.AddExternalSystemHealthChecks();
24-
// svc.AddKafkaEventBus();
25-
svc.AddRedisBus();
2625
},
2726
(svc, _) => { svc.AddScoped<IUserGateway, UserGateway>(); }
2827
);
28+
29+
services.AddDomainEventBus();
30+
services.AddRedisBus();
2931
}
3032

3133
public void Configure(IApplicationBuilder app)

samples/TodoApi/appsettings.Development.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
}
66
},
77
"MySqlDb": {
8-
"FQDN": "127.0.0.1:30584",
8+
"FQDN": "127.0.0.1:32605",
99
"Password": "P@ssw0rd"
1010
},
11-
"Kafka": {
12-
"FQDN": "127.0.0.1:9092"
13-
},
1411
"Redis": {
15-
"FQDN": "127.0.0.1:31496",
12+
"FQDN": "127.0.0.1:32170",
1613
"Password": "letmein"
1714
},
15+
"Kafka": {
16+
"FQDN": "127.0.0.1:9092"
17+
},
1818
"Logging": {
1919
"IncludeScopes": false,
2020
"LogLevel": {

0 commit comments

Comments
 (0)