Skip to content

Commit f79381f

Browse files
Sneed, Anthonytonysneed
Sneed, Anthony
authored andcommitted
Add Aspire with Dapr support to reference architecture solution
- Add AppHost and ServiceDefaults projects - Add Aspire.Hosting.Dapr package to AppHost - Reference Customer and Order from AppHost - Reference ServiceDefaults project from Customer and Order - Call builder.AddServiceDefaults() from Program in Customer and Order - Switch to MongoEventCache in Order - Add appsettings.Specs.json to Customer and Order - Add specs profile to AppHost launchSettings.json - Remove tye.yaml files - Update ReadMe.md, DevelopmentGuide.md
1 parent 4aefce2 commit f79381f

23 files changed

+362
-167
lines changed

DevelopmentGuide.md

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The following steps illustrate how to create microservices based on the principl
1313
- **EventDriven.CQRS.Extensions**
1414
- **EventDriven.DependencyInjection.URF.Mongo**
1515
- **EventDriven.EventBus.Dapr**
16-
- **EventDriven.EventBus.Dapr.EventCache.Mongo**
16+
- **EventDriven.EventBus.EventCache.Mongo**
1717
- **MongoDB.Driver**
1818
- **URF.Core.Mongo**
1919
2. Add **Domain/CustomerAggregate** folders to the project, then add a `Customer` class that extends `Entity`.
@@ -336,7 +336,7 @@ The following steps illustrate how to create microservices based on the principl
336336

337337
// Add Dapr event bus
338338
builder.Services.AddDaprEventBus(builder.Configuration, true);
339-
builder.Services.AddDaprMongoEventCache(builder.Configuration);
339+
builder.Services.AddMongoEventCache(builder.Configuration);
340340
```
341341
12. Add configuration entries to **appsettings.json**.
342342
```json
@@ -348,12 +348,10 @@ The following steps illustrate how to create microservices based on the principl
348348
"DaprEventBusOptions": {
349349
"PubSubName": "pubsub"
350350
},
351-
"DaprEventCacheOptions": {
352-
"DaprStateStoreOptions": {
353-
"StateStoreName": "statestore-mongodb"
354-
}
351+
"MongoEventCacheOptions": {
352+
"AppName": "order-service"
355353
},
356-
"DaprStoreDatabaseSettings": {
354+
"MongoStoreDatabaseSettings": {
357355
"ConnectionString": "mongodb://localhost:27017",
358356
"DatabaseName": "daprStore",
359357
"CollectionName": "daprCollection"
@@ -390,7 +388,7 @@ The following steps illustrate how to create microservices based on the principl
390388
```csharp
391389
builder.Services.AddSingleton<CustomerAddressUpdatedEventHandler>();
392390
builder.Services.AddDaprEventBus(builder.Configuration, true);
393-
builder.Services.AddDaprMongoEventCache(builder.Configuration);
391+
builder.Services.AddMongoEventCache(builder.Configuration);
394392
```
395393
- Also in `Program` use Cloud Events, map subscribe handlers, and map Dapr Event Bus endpoints.
396394
```csharp
@@ -406,43 +404,21 @@ The following steps illustrate how to create microservices based on the principl
406404
});
407405
});
408406
```
409-
14. Add configuration entries for `DaprEventCacheOptions` and `DaprStoreDatabaseSettings` to **appsettings.json**.
407+
14. Add configuration entries for `MongoEventCacheOptions` and `MongoStoreDatabaseSettings` to **appsettings.json**.
410408
```json
411-
"DaprEventCacheOptions": {
412-
"DaprStateStoreOptions": {
413-
"StateStoreName": "statestore-mongodb"
414-
}
409+
"MongoEventCacheOptions": {
410+
"AppName": "order-service"
415411
},
416-
"DaprStoreDatabaseSettings": {
412+
"MongoStoreDatabaseSettings": {
417413
"ConnectionString": "mongodb://localhost:27017",
418414
"DatabaseName": "daprStore",
419415
"CollectionName": "daprCollection"
420-
},
416+
}
421417
```
422418
15. Lastly, add a **dapr/components** directory to the **reference-architecture** folder.
423419
- Add the following dapr component yaml files:
424420
- **pubsub.yaml**
425421
- **statestore.yaml**
426422
- **statestore-mongodb.yaml**
427423
- Files not in use should be placed in a separate folder.
428-
- Add a **tye.yaml** file to the **reference-architecture** folder (recommended), including the dapr extension and components path. Optionally specify port bindings which match those in **launchSettings.json**.
429-
```yaml
430-
name: event-driven-ref-arch
431-
extensions:
432-
- name: dapr
433-
log-level: debug
434-
components-path: "dapr/components"
435-
services:
436-
- name: customer-service
437-
project: CustomerService/CustomerService.csproj
438-
bindings:
439-
- port: 5656
440-
- name: order-service
441-
project: OrderService/OrderService.csproj
442-
bindings:
443-
- port: 5757
444-
```
445-
- Run the Customer and Order services using [Tye](https://github.com/dotnet/tye).
446-
- Be sure to install the [Tye CLI](https://github.com/dotnet/tye/blob/main/docs/getting_started.md) tool globally.
447-
- To debug services, set breakpoints and execute `tye run --debug *`. Then attach the debugger to **CustomerService.dll** and/or **OrderService.dll**.
448424

EventDriven.ReferenceArchitecture.sln

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,13 @@ VisualStudioVersion = 17.0.32014.148
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AFFCBFA4-9D64-43AA-AC59-D4CC54BD9C72}"
77
ProjectSection(SolutionItems) = preProject
8-
ReadMe.md = ReadMe.md
98
DevelopmentGuide.md = DevelopmentGuide.md
9+
ReadMe.md = ReadMe.md
1010
EndProjectSection
1111
EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{269CD137-4093-4100-B33E-808586D335F6}"
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "reference-architecture", "reference-architecture", "{C4FD0AF1-927A-4860-A634-7CE342807692}"
15-
ProjectSection(SolutionItems) = preProject
16-
reference-architecture\tye.yaml = reference-architecture\tye.yaml
17-
EndProjectSection
1815
EndProject
1916
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomerService", "reference-architecture\CustomerService\CustomerService.csproj", "{48983715-E6DF-462F-AF3C-769C1122794F}"
2017
EndProject
@@ -42,11 +39,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "standby", "standby", "{A045
4239
reference-architecture\dapr\standby\pubsub-snssqs.yaml = reference-architecture\dapr\standby\pubsub-snssqs.yaml
4340
EndProjectSection
4441
EndProject
45-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventDriven.ReferenceArchitecture.Specs", "test\EventDriven.ReferenceArchitecture.Specs\EventDriven.ReferenceArchitecture.Specs.csproj", "{68B613B3-EB4A-41DB-A61E-1E031C5BFA85}"
42+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventDriven.ReferenceArchitecture.Specs", "test\EventDriven.ReferenceArchitecture.Specs\EventDriven.ReferenceArchitecture.Specs.csproj", "{68B613B3-EB4A-41DB-A61E-1E031C5BFA85}"
4643
EndProject
47-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomerService.Tests", "test\CustomerService.Tests\CustomerService.Tests.csproj", "{C5056BF3-987B-466C-962D-77F8E725F210}"
44+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomerService.Tests", "test\CustomerService.Tests\CustomerService.Tests.csproj", "{C5056BF3-987B-466C-962D-77F8E725F210}"
4845
EndProject
49-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Tests", "test\OrderService.Tests\OrderService.Tests.csproj", "{B3A36227-2EB9-4BEC-8FCA-B5DB7A809C06}"
46+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrderService.Tests", "test\OrderService.Tests\OrderService.Tests.csproj", "{B3A36227-2EB9-4BEC-8FCA-B5DB7A809C06}"
47+
EndProject
48+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReferenceArchitecture.AppHost", "reference-architecture\ReferenceArchitecture.AppHost\ReferenceArchitecture.AppHost.csproj", "{8E145A04-E2D6-4507-86B7-F5E4A3CA8C61}"
49+
EndProject
50+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReferenceArchitecture.ServiceDefaults", "reference-architecture\ReferenceArchitecture.ServiceDefaults\ReferenceArchitecture.ServiceDefaults.csproj", "{CB1E0EE8-0B80-40EB-B838-D1F568A05B29}"
5051
EndProject
5152
Global
5253
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -78,6 +79,14 @@ Global
7879
{B3A36227-2EB9-4BEC-8FCA-B5DB7A809C06}.Debug|Any CPU.Build.0 = Debug|Any CPU
7980
{B3A36227-2EB9-4BEC-8FCA-B5DB7A809C06}.Release|Any CPU.ActiveCfg = Release|Any CPU
8081
{B3A36227-2EB9-4BEC-8FCA-B5DB7A809C06}.Release|Any CPU.Build.0 = Release|Any CPU
82+
{8E145A04-E2D6-4507-86B7-F5E4A3CA8C61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
83+
{8E145A04-E2D6-4507-86B7-F5E4A3CA8C61}.Debug|Any CPU.Build.0 = Debug|Any CPU
84+
{8E145A04-E2D6-4507-86B7-F5E4A3CA8C61}.Release|Any CPU.ActiveCfg = Release|Any CPU
85+
{8E145A04-E2D6-4507-86B7-F5E4A3CA8C61}.Release|Any CPU.Build.0 = Release|Any CPU
86+
{CB1E0EE8-0B80-40EB-B838-D1F568A05B29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
87+
{CB1E0EE8-0B80-40EB-B838-D1F568A05B29}.Debug|Any CPU.Build.0 = Debug|Any CPU
88+
{CB1E0EE8-0B80-40EB-B838-D1F568A05B29}.Release|Any CPU.ActiveCfg = Release|Any CPU
89+
{CB1E0EE8-0B80-40EB-B838-D1F568A05B29}.Release|Any CPU.Build.0 = Release|Any CPU
8190
EndGlobalSection
8291
GlobalSection(SolutionProperties) = preSolution
8392
HideSolutionNode = FALSE
@@ -87,12 +96,14 @@ Global
8796
{16A5B2CB-8C46-4F3E-B7A1-97C47D9F66E7} = {C4FD0AF1-927A-4860-A634-7CE342807692}
8897
{B11B21E0-7B89-4285-990A-D98793310B02} = {C4FD0AF1-927A-4860-A634-7CE342807692}
8998
{FC04D111-903D-49FF-84A6-8806C71E2168} = {C4FD0AF1-927A-4860-A634-7CE342807692}
90-
{00BA9501-787E-465C-97D0-F51295D97802} = {F0E48E00-7D72-4614-9C13-90A7B015B06F}
9199
{F0E48E00-7D72-4614-9C13-90A7B015B06F} = {C4FD0AF1-927A-4860-A634-7CE342807692}
100+
{00BA9501-787E-465C-97D0-F51295D97802} = {F0E48E00-7D72-4614-9C13-90A7B015B06F}
92101
{A045033E-5283-4A6F-87D3-B02194595788} = {F0E48E00-7D72-4614-9C13-90A7B015B06F}
93102
{68B613B3-EB4A-41DB-A61E-1E031C5BFA85} = {269CD137-4093-4100-B33E-808586D335F6}
94103
{C5056BF3-987B-466C-962D-77F8E725F210} = {269CD137-4093-4100-B33E-808586D335F6}
95104
{B3A36227-2EB9-4BEC-8FCA-B5DB7A809C06} = {269CD137-4093-4100-B33E-808586D335F6}
105+
{8E145A04-E2D6-4507-86B7-F5E4A3CA8C61} = {C4FD0AF1-927A-4860-A634-7CE342807692}
106+
{CB1E0EE8-0B80-40EB-B838-D1F568A05B29} = {C4FD0AF1-927A-4860-A634-7CE342807692}
96107
EndGlobalSection
97108
GlobalSection(ExtensibilityGlobals) = postSolution
98109
SolutionGuid = {427A0D03-63CA-48AE-AA95-D21800101398}

ReadMe.md

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,21 @@
33
Reference architecture for using **Event Driven .NET** abstractions and libraries for [Domain Driven Design](https://en.wikipedia.org/wiki/Domain-driven_design) (DDD), [Command Query Responsibility Segregation](https://martinfowler.com/bliki/CQRS.html) (CQRS) and [Event Driven Architecture](https://en.wikipedia.org/wiki/Event-driven_architecture) (EDA).
44

55
## Prerequisites
6-
- [.NET Core SDK](https://dotnet.microsoft.com/download) (6.0 or greater)
6+
- [.NET Core SDK](https://dotnet.microsoft.com/download) (8.0 or greater)
77
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
88
- MongoDB Docker: `docker run --name mongo -d -p 27017:27017 -v /tmp/mongo/data:/data/db mongo`
9-
- [MongoDB Client](https://robomongo.org/download):
10-
- Download Robo 3T only.
9+
- [MongoDB Client](https://studio3t.com/download/):
10+
- Download Studio 3T only.
1111
- Add connection to localhost on port 27017.
1212
- [Dapr](https://dapr.io/) (Distributed Application Runtime)
1313
- [Install Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/)
1414
- [Initialize Dapr](https://docs.dapr.io/getting-started/install-dapr-selfhost/)
15-
- [Microsoft Tye](https://github.com/dotnet/tye/blob/main/docs/getting_started.md) (recommended)
15+
- [.NET Aspire Workload](https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=dotnet-cli#install-net-aspire)
16+
```
17+
dotnet workload update
18+
dotnet workload install aspire
19+
dotnet workload list
20+
```
1621
- [Specflow](https://specflow.org/) IDE Plugin (recommended)
1722
- [Visual Studio](https://docs.specflow.org/projects/getting-started/en/latest/GettingStarted/Step1.html)
1823
- [JetBrains Rider](https://docs.specflow.org/projects/specflow/en/latest/Rider/rider-installation.html)
@@ -38,58 +43,76 @@ The **Reference Architecture** projects demonstrate how to apply these concepts
3843
<img width="600" src="images/event-driven-ref-arch.png">
3944
</p>
4045

41-
## Running Services with Tye and Dapr
46+
## Running Services with Aspire
4247

43-
> **Note**: As an alternative to Tye, you can run services directly usng the [Dapr CLI](https://docs.dapr.io/getting-started/install-dapr-cli/). This may be useful for troubleshooting Dapr issues after setting `Microsoft.AspNetCore` logging level to `Debug`:
44-
> `dapr run --app-id service-name --app-port #### --components-path ../dapr/components -- dotnet run`
45-
46-
1. Open a terminal at the **reference-architecture** directory and run Tye to launch all services simultaneously.
47-
```
48-
tye run
49-
```
50-
2. Alternatively, run Tye in debug mode.
51-
```
52-
tye run --debug *
53-
```
54-
- Set breakpoints in **OrderService**, **CustomerService**.
55-
- Attach the IDE debugger to **OrderService.dll**, **CustomerService.dll**.
56-
3. Open the Tye dashboard at http://localhost:8000 to inspect service endpoints and view logs.
57-
4. Create some customers.
48+
1. If using an IDE such as Visual Studio or Rider, Using an IDE such as Visual Studio or Rider, run the **http** profile of **ReferenceArchitecture.AppHost**.
49+
2. Open the Aspire dashboard to inspect service endpoints and view logs.
50+
3. Create some customers.
5851
- Open http://localhost:5656/swagger
5952
- Execute posts using contents of **customers.json**.
6053
- Copy post response, modify fields, then execute puts.
6154
- Make sure to copy `etag` value from last response, or you will get a concurrency error.
6255
- Copy `id` and `etag` values to execute deletes.
6356
- Execute gets to retrieve customers.
6457
- View customers database collections using Robo 3T.
65-
5. Create some orders.
58+
4. Create some orders.
6659
- Open http://localhost:5757/swagger
6760
- Execute posts using contents of **orders.json**.
6861
- Copy post response, modify fields, then execute puts.
6962
- Make sure to copy `etag` value from last response, or you will get a concurrency error.
7063
- Copy `id` and `etag` values to execute deletes.
7164
- Execute gets to retrieve orders.
7265
- View orders database collections using Robo 3T.
73-
6. Update the address of a customer who has order.
66+
5. Update the address of a customer who has order.
7467
- Note the address is also updated for the customer's orders.
7568
- Observe log messages in terminal when integration events are published and handled.
7669

77-
## Tests
70+
## Running Services with the Dapr CLI
71+
72+
1. Start the Customer Service using the Dapr CLI from a terminal at the project root.
73+
74+
```
75+
dapr run --app-id customer-service --app-port 5656 --resources-path ../dapr/components -- dotnet run
76+
```
77+
78+
2. Start the Order Service using the Dapr CLI from a terminal at the project root.
79+
80+
```
81+
dapr run --app-id order-service --app-port 5757 --resources-path ../dapr/components -- dotnet run
82+
```
83+
84+
3. Open the Dapr Dashboard at http://localhost:8080
85+
86+
87+
```
88+
dapr dashboard
89+
```
90+
91+
4. Execute steps 3-5 above to use services and pub-sub features.
92+
93+
## Running Tests
7894
7995
### Unit Tests
8096
8197
In the **test** folder you'll find unit tests for both **CustomerService** and **OrderService** projects.
8298
- [xUnit](https://xunit.net/) is used as the unit testing framework.
8399
- [Moq](https://github.com/moq/moq4) is used as the mocking framework.
84100
85-
> **Note**: Because database API's are notoriously [difficult to mock](https://jimmybogard.com/avoid-in-memory-databases-for-tests/), **repositories** are deliberately *excluded* from unit testing. Instead, repositories attain code coverage with **integration / acceptance tests**.
101+
> **Note**: Because database API's are notoriously [difficult to mock](https://jimmybogard.com/avoid-in-memory-databases-for-tests/), **repositories** are deliberately *excluded* from unit testing. Instead, repositories attain code coverage with **acceptance/integration tests**.
86102
87-
### Integration / Acceptance Tests
103+
1. Run unit **CustomerService.Tests** and **OrderService.Tests** from the Test explorer in your IDE.
104+
2. Alternatively, open a terminal at **CustomerService.Tests** and **OrderService.Tests**, then run `dotnet test`
88105
89-
In the **tests** folder you'll find an **EventDriven.ReferenceArchitecture.Specs** project with automated integration / acceptance tests.
106+
### Acceptance (Integration) Tests
107+
108+
In the **tests** folder you'll find an **EventDriven.ReferenceArchitecture.Specs** project with automated acceptance / integration tests.
90109
- [SpecFlow](https://specflow.org/) is used as the acceptance testing framework.
91110
- Feature files use [Gherkin](https://specflow.org/learn/gherkin/) syntax to enable [Behavior Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) with scenarios that match **acceptance criteria** in user stories.
92111
112+
1. Using an IDE such as Visual Studio or Rider, run the **specs** profile of **ReferenceArchitecture.AppHost**.
113+
2. Run **EventDriven.ReferenceArchitecture.Specs** from the Test explorer of your IDE.
114+
3. Alternatively, open a terminal at **EventDriven.ReferenceArchitecture.Specs**, then run `dotnet test`
115+
93116
## Development Guide
94117
95118
For step-by-step instructions on how to build microservices with [Event Driven .NET](https://github.com/event-driven-dotnet/Home) using this reference architecture, please see the **Event Driven .NET** [Development Guide](DevelopmentGuide.md).

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.100",
4+
"rollForward": "latestPatch",
5+
"allowPrerelease": true
6+
}
7+
}

reference-architecture/CustomerService/CustomerService.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
45
<TargetFramework>net8.0</TargetFramework>
56
<Nullable>enable</Nullable>
67
<ImplicitUsings>enable</ImplicitUsings>
@@ -12,14 +13,14 @@
1213
<PackageReference Include="EventDriven.CQRS.Extensions" Version="2.0.0" />
1314
<PackageReference Include="EventDriven.DependencyInjection.URF.Mongo" Version="1.2.2" />
1415
<PackageReference Include="EventDriven.EventBus.Dapr" Version="1.4.0" />
15-
<PackageReference Include="EventDriven.EventBus.Dapr.EventCache.Mongo" Version="1.4.0" />
1616
<PackageReference Include="MongoDB.Driver" Version="2.23.1" />
1717
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
1818
<PackageReference Include="URF.Core.Mongo" Version="7.0.0" />
1919
</ItemGroup>
2020

2121
<ItemGroup>
2222
<ProjectReference Include="..\Common\Common.csproj" />
23+
<ProjectReference Include="..\ReferenceArchitecture.ServiceDefaults\ReferenceArchitecture.ServiceDefaults.csproj" />
2324
</ItemGroup>
2425

2526
</Project>

reference-architecture/CustomerService/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,14 @@
88

99
var builder = WebApplication.CreateBuilder(args);
1010

11+
// Add Aspire service defaults
12+
builder.AddServiceDefaults();
13+
1114
// Add services to the container.
1215
builder.Services.AddControllers();
1316
builder.Services.AddEndpointsApiExplorer();
1417
builder.Services.AddSwaggerGen();
18+
builder.Services.AddProblemDetails();
1519

1620
// Add automapper
1721
builder.Services.AddAutoMapper(typeof(Program));
@@ -28,7 +32,6 @@
2832

2933
// Add Dapr event bus
3034
builder.Services.AddDaprEventBus(builder.Configuration);
31-
builder.Services.AddDaprMongoEventCache(builder.Configuration);
3235

3336
var app = builder.Build();
3437

reference-architecture/CustomerService/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"profiles": {
44
"CustomerService": {
55
"commandName": "Project",
6-
"dotnetRunMessages": "true",
6+
"dotnetRunMessages": true,
77
"launchBrowser": true,
88
"launchUrl": "swagger",
99
"applicationUrl": "http://localhost:5656",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft": "Warning",
6+
"Microsoft.Hosting.Lifetime": "Information"
7+
}
8+
},
9+
"CustomerDatabaseSettings": {
10+
"ConnectionString": "mongodb://localhost:27017",
11+
"DatabaseName": "CustomersTestDb",
12+
"CollectionName": "Customers"
13+
}
14+
}

reference-architecture/CustomerService/appsettings.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@
1515
"DaprEventBusOptions": {
1616
"PubSubName": "pubsub"
1717
},
18-
"DaprEventCacheOptions": {
19-
"DaprStateStoreOptions": {
20-
"StateStoreName": "statestore-mongodb"
21-
}
22-
},
23-
"DaprStoreDatabaseSettings": {
24-
"ConnectionString": "mongodb://localhost:27017",
25-
"DatabaseName": "daprStore",
26-
"CollectionName": "daprCollection"
27-
},
2818
"DaprEventBusSchemaOptions": {
2919
"UseSchemaRegistry": true,
3020
"SchemaValidatorType": "Json",

0 commit comments

Comments
 (0)