Merge pull request #13 from dotnet-architecture/dev

upd fork
This commit is contained in:
Taras Kovalenko 2017-12-22 21:47:09 +02:00 committed by GitHub
commit 93cfacde69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
64 changed files with 166 additions and 247 deletions

View File

@ -21,4 +21,5 @@ cli-linux
**/bin/ **/bin/
**/obj/ **/obj/
**/node_modules/ **/node_modules/
**/bower_components/ **/bower_components/
global.json

View File

@ -1,9 +1,10 @@
# eShopOnContainers - Microservices Architecture and Containers based Reference Application (**BETA state** - Visual Studio 2017 and CLI environments compatible) # eShopOnContainers - Microservices Architecture and Containers based Reference Application (**BETA state** - Visual Studio 2017 and CLI environments compatible)
Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers. <p> Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers. <p>
**Note Visual Studio 2017 version required**: This is important as of November 2017. For working with Docker and docker-compose files (needed with eShopOnContainers), do not migrate to VS 2017 15.4 as it has a bug when using TAGs in the docker-compose files.
Please, either use VS 2017 15.35 or VS 2017 15.5 Preview (bug is fixed here) or later. **NEWS / ANNOUNCEMENTS**
VS Preview installs next to your stable Visual Studio IDE, allowing you to use either independently. What to be up-to-date on .NET Architecture guidance and reference apps like eShopOnContainers? --> Subscribe by "WATCHING" this new GitHub repo: https://github.com/dotnet-architecture/News
Download of Preview here: https://www.visualstudio.com/vs/preview/
**Note Visual Studio 2017 version required**: Please, use VS 2017 15.5 or later.
**Note for Pull Requests**: We accept pull request from the community. When doing it, please do it onto the DEV branch which is the consolidated work-in-progress branch. Do not request it onto Master, if possible. **Note for Pull Requests**: We accept pull request from the community. When doing it, please do it onto the DEV branch which is the consolidated work-in-progress branch. Do not request it onto Master, if possible.

View File

@ -4,8 +4,8 @@ services:
basket.api: basket.api:
image: eshop/basket.api-win:${TAG:-latest} image: eshop/basket.api-win:${TAG:-latest}
build: build:
context: ./src/Services/Basket/Basket.API context: .
dockerfile: Dockerfile dockerfile: ./src/Services/Basket/Basket.API/Dockerfile
depends_on: depends_on:
- basket.data - basket.data
- identity.api - identity.api
@ -14,8 +14,8 @@ services:
catalog.api: catalog.api:
image: eshop/catalog.api-win:${TAG:-latest} image: eshop/catalog.api-win:${TAG:-latest}
build: build:
context: ./src/Services/Catalog/Catalog.API context: .
dockerfile: Dockerfile dockerfile: ./src/Services/Catalog/Catalog.API/Dockerfile
depends_on: depends_on:
- sql.data - sql.data
- rabbitmq - rabbitmq
@ -23,16 +23,16 @@ services:
identity.api: identity.api:
image: eshop/identity.api-win:${TAG:-latest} image: eshop/identity.api-win:${TAG:-latest}
build: build:
context: ./src/Services/Identity/Identity.API context: .
dockerfile: Dockerfile dockerfile: ./src/Services/Identity/Identity.API/Dockerfile
depends_on: depends_on:
- sql.data - sql.data
ordering.api: ordering.api:
image: eshop/ordering.api-win:${TAG:-latest} image: eshop/ordering.api-win:${TAG:-latest}
build: build:
context: ./src/Services/Ordering/Ordering.API context: .
dockerfile: Dockerfile dockerfile: ./src/Services/Ordering/Ordering.API/Dockerfile
depends_on: depends_on:
- sql.data - sql.data
- rabbitmq - rabbitmq
@ -40,19 +40,19 @@ services:
marketing.api: marketing.api:
image: eshop/marketing.api-win:${TAG:-latest} image: eshop/marketing.api-win:${TAG:-latest}
build: build:
context: ./src/Services/Marketing/Marketing.API context: .
dockerfile: Dockerfile dockerfile: ./src/Services/Marketing/Marketing.API/Dockerfile
depends_on: depends_on:
- sql.data - sql.data
- nosql.data - nosql.data
- identity.api - identity.api
- rabbitmq - rabbitmq
webspa: webspa:
image: eshop/webspa-win:${TAG:-latest} image: eshop/webspa-win:${TAG:-latest}
build: build:
context: ./src/Web/WebSPA context: .
dockerfile: Dockerfile dockerfile: ./src/Web/WebSPA/Dockerfile
depends_on: depends_on:
- catalog.api - catalog.api
- ordering.api - ordering.api
@ -75,22 +75,22 @@ services:
webstatus: webstatus:
image: eshop/webstatus-win:${TAG:-latest} image: eshop/webstatus-win:${TAG:-latest}
build: build:
context: ./src/Web/WebStatus context: .
dockerfile: Dockerfile dockerfile: ./src/Web/WebStatus/Dockerfile
payment.api: payment.api:
image: eshop/payment.api-win:${TAG:-latest} image: eshop/payment.api-win:${TAG:-latest}
build: build:
context: ./src/Services/Payment/Payment.API context: .
dockerfile: Dockerfile dockerfile: ./src/Services/Payment/Payment.API/Dockerfile
depends_on: depends_on:
- rabbitmq - rabbitmq
locations.api: locations.api:
image: eshop/locations.api-win:${TAG:-latest} image: eshop/locations.api-win:${TAG:-latest}
build: build:
context: ./src/Services/Location/Locations.API context: .
dockerfile: Dockerfile dockerfile: ./src/Services/Location/Locations.API/Dockerfile
depends_on: depends_on:
- nosql.data - nosql.data
- rabbitmq - rabbitmq

View File

@ -103,7 +103,7 @@ services:
image: mongo image: mongo
basket.data: basket.data:
image: redis image: redis:alpine
rabbitmq: rabbitmq:
image: rabbitmq:3-management image: rabbitmq:3-management-alpine

View File

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.26730.15 VisualStudioVersion = 15.0.27130.2003
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}" Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
@ -108,10 +108,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStatus", "src\Web\WebSta
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.SqlServer", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.SqlServer\Microsoft.Extensions.HealthChecks.SqlServer.csproj", "{6CCC4F1B-602D-4FAD-91A7-002CC86C7612}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.SqlServer", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.SqlServer\Microsoft.Extensions.HealthChecks.SqlServer.csproj", "{6CCC4F1B-602D-4FAD-91A7-002CC86C7612}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataProtection", "DataProtection", "{CC0FD121-5E19-44B6-B23F-0FE3D1B821D3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataProtection", "src\BuildingBlocks\DataProtection\DataProtection\DataProtection.csproj", "{237CA273-8555-4944-B87D-5B65AB3A788C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{0CF40BE0-A463-4E4F-A29C-C7427D04DC4F}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{0CF40BE0-A463-4E4F-A29C-C7427D04DC4F}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Locations.API", "src\Services\Location\Locations.API\Locations.API.csproj", "{B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Locations.API", "src\Services\Location\Locations.API\Locations.API.csproj", "{B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}"
@ -1495,54 +1491,6 @@ Global
{6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x64.Build.0 = Release|Any CPU {6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x64.Build.0 = Release|Any CPU
{6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x86.ActiveCfg = Release|Any CPU {6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x86.ActiveCfg = Release|Any CPU
{6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x86.Build.0 = Release|Any CPU {6CCC4F1B-602D-4FAD-91A7-002CC86C7612}.Release|x86.Build.0 = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|Any CPU.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|ARM.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|ARM.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|iPhone.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|x64.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|x64.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|x86.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.AppStore|x86.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|ARM.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|iPhone.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|x64.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|x64.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|x86.ActiveCfg = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Debug|x86.Build.0 = Debug|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|Any CPU.Build.0 = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|ARM.ActiveCfg = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|ARM.Build.0 = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|iPhone.ActiveCfg = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|iPhone.Build.0 = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|x64.ActiveCfg = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|x64.Build.0 = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|x86.ActiveCfg = Release|Any CPU
{237CA273-8555-4944-B87D-5B65AB3A788C}.Release|x86.Build.0 = Release|Any CPU
{B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
@ -1927,8 +1875,6 @@ Global
{D92EB452-7A72-4B26-A8ED-0204CD376BC4} = {D13768ED-5AF1-4E09-96DD-FF6E7A2E5E06} {D92EB452-7A72-4B26-A8ED-0204CD376BC4} = {D13768ED-5AF1-4E09-96DD-FF6E7A2E5E06}
{23FB706A-2701-41E9-8BF9-28936001CA41} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04} {23FB706A-2701-41E9-8BF9-28936001CA41} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04}
{6CCC4F1B-602D-4FAD-91A7-002CC86C7612} = {96CE8CE7-BC97-4A53-899F-5EB63D7BBF7B} {6CCC4F1B-602D-4FAD-91A7-002CC86C7612} = {96CE8CE7-BC97-4A53-899F-5EB63D7BBF7B}
{CC0FD121-5E19-44B6-B23F-0FE3D1B821D3} = {1EF3AC0F-F27C-46DD-AC53-D762D2C11C45}
{237CA273-8555-4944-B87D-5B65AB3A788C} = {CC0FD121-5E19-44B6-B23F-0FE3D1B821D3}
{0CF40BE0-A463-4E4F-A29C-C7427D04DC4F} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} {0CF40BE0-A463-4E4F-A29C-C7427D04DC4F} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
{B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800} = {0CF40BE0-A463-4E4F-A29C-C7427D04DC4F} {B30E0E82-9EA4-49D6-BA0D-BA8E5FA48800} = {0CF40BE0-A463-4E4F-A29C-C7427D04DC4F}
{72704C77-5C90-4705-B2A4-7A6E3B02FF08} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} {72704C77-5C90-4705-B2A4-7A6E3B02FF08} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}

View File

@ -1,5 +1,5 @@
{ {
"sdk": { "sdk": {
"version":"2.0.2" "version":"2.1.2"
} }
} }

View File

@ -6,10 +6,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Autofac" Version="4.6.1" /> <PackageReference Include="Autofac" Version="4.6.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Polly" Version="5.3.1" /> <PackageReference Include="Polly" Version="5.6.1" />
<PackageReference Include="RabbitMQ.Client" Version="5.0.1" /> <PackageReference Include="RabbitMQ.Client" Version="5.0.1" />
<PackageReference Include="System.ValueTuple" Version="4.4.0" /> <PackageReference Include="System.ValueTuple" Version="4.4.0" />
</ItemGroup> </ItemGroup>

View File

@ -6,8 +6,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Autofac" Version="4.6.1" /> <PackageReference Include="Autofac" Version="4.6.2" />
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="1.0.0" /> <PackageReference Include="Microsoft.Azure.ServiceBus" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
</ItemGroup> </ItemGroup>

View File

@ -6,11 +6,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup> </ItemGroup>

View File

@ -2,9 +2,6 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -16,7 +13,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -16,11 +16,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.0.1" />
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" /> <PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
<PackageReference Include="System.Threading.Thread" Version="4.3.0" /> <PackageReference Include="System.Threading.Thread" Version="4.3.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.4.0" /> <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.4.0" />
<PackageReference Include="WindowsAzure.Storage" Version="8.5.0" /> <PackageReference Include="WindowsAzure.Storage" Version="8.6.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -9,7 +9,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.4.0" /> <PackageReference Include="System.Data.SqlClient" Version="4.4.2" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -9,7 +9,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.2" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" /> <PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" /> <PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />

View File

@ -6,10 +6,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Http" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="Polly" Version="5.3.1" /> <PackageReference Include="Polly" Version="5.6.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -5,8 +5,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Polly" Version="5.6.1" />
<PackageReference Include="Polly" Version="5.3.1" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -16,10 +16,10 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" /> <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80

View File

@ -38,9 +38,9 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" /> <PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
</ItemGroup> </ItemGroup>

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80
@ -8,7 +8,6 @@ COPY eShopOnContainers-ServicesAndWebApps.sln ./
COPY src/Services/Identity/Identity.API/Identity.API.csproj src/Services/Identity/Identity.API/ COPY src/Services/Identity/Identity.API/Identity.API.csproj src/Services/Identity/Identity.API/
COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/ COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/
COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/ COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/
COPY src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj src/BuildingBlocks/DataProtection/DataProtection/
COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/ COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/
COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/ COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/
RUN dotnet restore RUN dotnet restore

View File

@ -4,7 +4,6 @@
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion> <RuntimeFrameworkVersion>2.0.0</RuntimeFrameworkVersion>
<UserSecretsId>aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5</UserSecretsId> <UserSecretsId>aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5</UserSecretsId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup> </PropertyGroup>
@ -19,12 +18,12 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.0.0" /> <PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.0.0" />
<PackageReference Include="IdentityServer4.EntityFramework" Version="2.0.0" /> <PackageReference Include="IdentityServer4.EntityFramework" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
</ItemGroup> </ItemGroup>
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish"> <Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80

View File

@ -3,7 +3,6 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
<RootNamespace>Microsoft.eShopOnContainers.Services.Locations.API</RootNamespace>
<UserSecretsId>aspnet-Locations.API-20161122013619</UserSecretsId> <UserSecretsId>aspnet-Locations.API-20161122013619</UserSecretsId>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -11,17 +10,17 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="mongocsharpdriver" Version="2.4.4" /> <PackageReference Include="mongocsharpdriver" Version="2.5.0" />
<PackageReference Include="MongoDB.Bson" Version="2.4.4" /> <PackageReference Include="MongoDB.Bson" Version="2.5.0" />
<PackageReference Include="MongoDB.Driver" Version="2.4.4" /> <PackageReference Include="MongoDB.Driver" Version="2.5.0" />
<PackageReference Include="MongoDB.Driver.Core" Version="2.4.4" /> <PackageReference Include="MongoDB.Driver.Core" Version="2.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="1.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="1.1.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" /> <ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80

View File

@ -1,5 +1,4 @@
using System; using System;
using System.Collections.Generic;
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Dto namespace Microsoft.eShopOnContainers.Services.Marketing.API.Dto
{ {
public class UserLocationDTO public class UserLocationDTO

View File

@ -1,10 +1,8 @@
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.Swagger;
using Swashbuckle.AspNetCore.SwaggerGen; using Swashbuckle.AspNetCore.SwaggerGen;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Filters namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Filters
{ {
@ -21,11 +19,13 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Filt
operation.Responses.Add("401", new Response { Description = "Unauthorized" }); operation.Responses.Add("401", new Response { Description = "Unauthorized" });
operation.Responses.Add("403", new Response { Description = "Forbidden" }); operation.Responses.Add("403", new Response { Description = "Forbidden" });
operation.Security = new List<IDictionary<string, IEnumerable<string>>>(); operation.Security = new List<IDictionary<string, IEnumerable<string>>>
operation.Security.Add(new Dictionary<string, IEnumerable<string>>
{ {
{ "oauth2", new [] { "marketingapi" } } new Dictionary<string, IEnumerable<string>>
}); {
{ "oauth2", new [] { "marketingapi" } }
}
};
} }
} }
} }

View File

@ -1,5 +1,4 @@
using System; using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations

View File

@ -1,6 +1,4 @@
using System; using Microsoft.EntityFrameworkCore.Migrations;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations
{ {

View File

@ -2,8 +2,6 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure;
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations
{ {

View File

@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives; using Microsoft.Extensions.Primitives;
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,10 +1,6 @@
using Microsoft.eShopOnContainers.Services.Marketing.API.Model; using Microsoft.eShopOnContainers.Services.Marketing.API.Model;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using MongoDB.Bson;
using MongoDB.Driver; using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Repositories namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Repositories

View File

@ -24,16 +24,16 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="mongocsharpdriver" Version="2.4.4" /> <PackageReference Include="mongocsharpdriver" Version="2.5.0" />
<PackageReference Include="MongoDB.Bson" Version="2.4.4" /> <PackageReference Include="MongoDB.Bson" Version="2.5.0" />
<PackageReference Include="MongoDB.Driver" Version="2.4.4" /> <PackageReference Include="MongoDB.Driver" Version="2.5.0" />
<PackageReference Include="MongoDB.Driver.Core" Version="2.4.4" /> <PackageReference Include="MongoDB.Driver.Core" Version="2.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" /> <ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />

View File

@ -1,11 +1,4 @@
using MongoDB.Bson; namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model
{ {
public class Location public class Location
{ {

View File

@ -2,8 +2,6 @@
using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Attributes;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model namespace Microsoft.eShopOnContainers.Services.Marketing.API.Model
{ {

View File

@ -1,8 +1,6 @@
using MediatR; using MediatR;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System; using System.Threading;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Ordering.API.Infrastructure.Behaviors namespace Ordering.API.Infrastructure.Behaviors
@ -12,7 +10,7 @@ namespace Ordering.API.Infrastructure.Behaviors
private readonly ILogger<LoggingBehavior<TRequest, TResponse>> _logger; private readonly ILogger<LoggingBehavior<TRequest, TResponse>> _logger;
public LoggingBehavior(ILogger<LoggingBehavior<TRequest, TResponse>> logger) => _logger = logger; public LoggingBehavior(ILogger<LoggingBehavior<TRequest, TResponse>> logger) => _logger = logger;
public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next) public async Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
{ {
_logger.LogInformation($"Handling {typeof(TRequest).Name}"); _logger.LogInformation($"Handling {typeof(TRequest).Name}");
var response = await next(); var response = await next();

View File

@ -1,10 +1,9 @@
using FluentValidation; using FluentValidation;
using MediatR; using MediatR;
using Microsoft.Extensions.Logging;
using Ordering.Domain.Exceptions; using Ordering.Domain.Exceptions;
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Ordering.API.Infrastructure.Behaviors namespace Ordering.API.Infrastructure.Behaviors
@ -14,7 +13,7 @@ namespace Ordering.API.Infrastructure.Behaviors
private readonly IValidator<TRequest>[] _validators; private readonly IValidator<TRequest>[] _validators;
public ValidatorBehavior(IValidator<TRequest>[] validators) => _validators = validators; public ValidatorBehavior(IValidator<TRequest>[] validators) => _validators = validators;
public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next) public async Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
{ {
var failures = _validators var failures = _validators
.Select(v => v.Validate(request)) .Select(v => v.Validate(request))

View File

@ -2,15 +2,13 @@
using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands; using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate;
using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency;
using System; using System.Threading;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Ordering.API.Application.Commands namespace Ordering.API.Application.Commands
{ {
// Regular CommandHandler // Regular CommandHandler
public class CancelOrderCommandHandler : IAsyncRequestHandler<CancelOrderCommand, bool> public class CancelOrderCommandHandler : IRequestHandler<CancelOrderCommand, bool>
{ {
private readonly IOrderRepository _orderRepository; private readonly IOrderRepository _orderRepository;
@ -25,7 +23,7 @@ namespace Ordering.API.Application.Commands
/// </summary> /// </summary>
/// <param name="command"></param> /// <param name="command"></param>
/// <returns></returns> /// <returns></returns>
public async Task<bool> Handle(CancelOrderCommand command) public async Task<bool> Handle(CancelOrderCommand command, CancellationToken cancellationToken)
{ {
var orderToUpdate = await _orderRepository.GetAsync(command.OrderNumber); var orderToUpdate = await _orderRepository.GetAsync(command.OrderNumber);
if(orderToUpdate == null) if(orderToUpdate == null)

View File

@ -5,11 +5,12 @@
using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Services; using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Services;
using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency;
using System; using System;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
// Regular CommandHandler // Regular CommandHandler
public class CreateOrderCommandHandler public class CreateOrderCommandHandler
: IAsyncRequestHandler<CreateOrderCommand, bool> : IRequestHandler<CreateOrderCommand, bool>
{ {
private readonly IOrderRepository _orderRepository; private readonly IOrderRepository _orderRepository;
private readonly IIdentityService _identityService; private readonly IIdentityService _identityService;
@ -23,7 +24,7 @@
_mediator = mediator ?? throw new ArgumentNullException(nameof(mediator)); _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator));
} }
public async Task<bool> Handle(CreateOrderCommand message) public async Task<bool> Handle(CreateOrderCommand message, CancellationToken cancellationToken)
{ {
// Add/Update the Buyer AggregateRoot // Add/Update the Buyer AggregateRoot
// DDD patterns comment: Add child entities and value-objects through the Order Aggregate-Root // DDD patterns comment: Add child entities and value-objects through the Order Aggregate-Root

View File

@ -1,5 +1,6 @@
using MediatR; using MediatR;
using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands
@ -10,7 +11,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands
/// </summary> /// </summary>
/// <typeparam name="T">Type of the command handler that performs the operation if request is not duplicated</typeparam> /// <typeparam name="T">Type of the command handler that performs the operation if request is not duplicated</typeparam>
/// <typeparam name="R">Return value of the inner command handler</typeparam> /// <typeparam name="R">Return value of the inner command handler</typeparam>
public class IdentifiedCommandHandler<T, R> : IAsyncRequestHandler<IdentifiedCommand<T, R>, R> public class IdentifiedCommandHandler<T, R> : IRequestHandler<IdentifiedCommand<T, R>, R>
where T : IRequest<R> where T : IRequest<R>
{ {
private readonly IMediator _mediator; private readonly IMediator _mediator;
@ -37,7 +38,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands
/// </summary> /// </summary>
/// <param name="message">IdentifiedCommand which contains both original command & request ID</param> /// <param name="message">IdentifiedCommand which contains both original command & request ID</param>
/// <returns>Return value of inner command or default value if request same ID was found</returns> /// <returns>Return value of inner command or default value if request same ID was found</returns>
public async Task<R> Handle(IdentifiedCommand<T, R> message) public async Task<R> Handle(IdentifiedCommand<T, R> message, CancellationToken cancellationToken)
{ {
var alreadyExists = await _requestManager.ExistAsync(message.Id); var alreadyExists = await _requestManager.ExistAsync(message.Id);
if (alreadyExists) if (alreadyExists)
@ -55,6 +56,4 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands
} }
} }
} }
}
}

View File

@ -2,12 +2,13 @@
using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands; using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate;
using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Ordering.API.Application.Commands namespace Ordering.API.Application.Commands
{ {
// Regular CommandHandler // Regular CommandHandler
public class ShipOrderCommandHandler : IAsyncRequestHandler<ShipOrderCommand, bool> public class ShipOrderCommandHandler : IRequestHandler<ShipOrderCommand, bool>
{ {
private readonly IOrderRepository _orderRepository; private readonly IOrderRepository _orderRepository;
@ -22,7 +23,7 @@ namespace Ordering.API.Application.Commands
/// </summary> /// </summary>
/// <param name="command"></param> /// <param name="command"></param>
/// <returns></returns> /// <returns></returns>
public async Task<bool> Handle(ShipOrderCommand command) public async Task<bool> Handle(ShipOrderCommand command, CancellationToken cancellationToken)
{ {
var orderToUpdate = await _orderRepository.GetAsync(command.OrderNumber); var orderToUpdate = await _orderRepository.GetAsync(command.OrderNumber);
if(orderToUpdate == null) if(orderToUpdate == null)

View File

@ -1,16 +1,15 @@
using MediatR; using MediatR;
using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Ordering.API.Application.IntegrationEvents;
using Ordering.API.Application.IntegrationEvents.Events;
using Ordering.Domain.Events; using Ordering.Domain.Events;
using System; using System;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Ordering.API.Application.DomainEventHandlers.BuyerAndPaymentMethodVerified namespace Ordering.API.Application.DomainEventHandlers.BuyerAndPaymentMethodVerified
{ {
public class UpdateOrderWhenBuyerAndPaymentMethodVerifiedDomainEventHandler public class UpdateOrderWhenBuyerAndPaymentMethodVerifiedDomainEventHandler
: IAsyncNotificationHandler<BuyerAndPaymentMethodVerifiedDomainEvent> : INotificationHandler<BuyerAndPaymentMethodVerifiedDomainEvent>
{ {
private readonly IOrderRepository _orderRepository; private readonly IOrderRepository _orderRepository;
private readonly ILoggerFactory _logger; private readonly ILoggerFactory _logger;
@ -25,7 +24,7 @@ namespace Ordering.API.Application.DomainEventHandlers.BuyerAndPaymentMethodVeri
// Domain Logic comment: // Domain Logic comment:
// When the Buyer and Buyer's payment method have been created or verified that they existed, // When the Buyer and Buyer's payment method have been created or verified that they existed,
// then we can update the original Order with the BuyerId and PaymentId (foreign keys) // then we can update the original Order with the BuyerId and PaymentId (foreign keys)
public async Task Handle(BuyerAndPaymentMethodVerifiedDomainEvent buyerPaymentMethodVerifiedEvent) public async Task Handle(BuyerAndPaymentMethodVerifiedDomainEvent buyerPaymentMethodVerifiedEvent, CancellationToken cancellationToken)
{ {
var orderToUpdate = await _orderRepository.GetAsync(buyerPaymentMethodVerifiedEvent.OrderId); var orderToUpdate = await _orderRepository.GetAsync(buyerPaymentMethodVerifiedEvent.OrderId);
orderToUpdate.SetBuyerId(buyerPaymentMethodVerifiedEvent.Buyer.Id); orderToUpdate.SetBuyerId(buyerPaymentMethodVerifiedEvent.Buyer.Id);

View File

@ -9,9 +9,10 @@
using Ordering.API.Application.IntegrationEvents; using Ordering.API.Application.IntegrationEvents;
using System.Linq; using System.Linq;
using Ordering.API.Application.IntegrationEvents.Events; using Ordering.API.Application.IntegrationEvents.Events;
using System.Threading;
public class OrderStatusChangedToAwaitingValidationDomainEventHandler public class OrderStatusChangedToAwaitingValidationDomainEventHandler
: IAsyncNotificationHandler<OrderStatusChangedToAwaitingValidationDomainEvent> : INotificationHandler<OrderStatusChangedToAwaitingValidationDomainEvent>
{ {
private readonly IOrderRepository _orderRepository; private readonly IOrderRepository _orderRepository;
private readonly ILoggerFactory _logger; private readonly ILoggerFactory _logger;
@ -26,11 +27,11 @@
_orderingIntegrationEventService = orderingIntegrationEventService; _orderingIntegrationEventService = orderingIntegrationEventService;
} }
public async Task Handle(OrderStatusChangedToAwaitingValidationDomainEvent orderStatusChangedToAwaitingValidationDomainEvent) public async Task Handle(OrderStatusChangedToAwaitingValidationDomainEvent orderStatusChangedToAwaitingValidationDomainEvent, CancellationToken cancellationToken)
{ {
_logger.CreateLogger(nameof(OrderStatusChangedToAwaitingValidationDomainEvent)) _logger.CreateLogger(nameof(OrderStatusChangedToAwaitingValidationDomainEvent))
.LogTrace($"Order with Id: {orderStatusChangedToAwaitingValidationDomainEvent.OrderId} has been successfully updated with " + .LogTrace($"Order with Id: {orderStatusChangedToAwaitingValidationDomainEvent.OrderId} has been successfully updated with " +
$"a status order id: {OrderStatus.AwaitingValidation.Id}"); $"a status order id: {OrderStatus.AwaitingValidation.Id}");
var orderStockList = orderStatusChangedToAwaitingValidationDomainEvent.OrderItems var orderStockList = orderStatusChangedToAwaitingValidationDomainEvent.OrderItems
.Select(orderItem => new OrderStockItem(orderItem.ProductId, orderItem.GetUnits())); .Select(orderItem => new OrderStockItem(orderItem.ProductId, orderItem.GetUnits()));

View File

@ -9,9 +9,10 @@
using Ordering.API.Application.IntegrationEvents; using Ordering.API.Application.IntegrationEvents;
using System.Linq; using System.Linq;
using Ordering.API.Application.IntegrationEvents.Events; using Ordering.API.Application.IntegrationEvents.Events;
using System.Threading;
public class OrderStatusChangedToPaidDomainEventHandler public class OrderStatusChangedToPaidDomainEventHandler
: IAsyncNotificationHandler<OrderStatusChangedToPaidDomainEvent> : INotificationHandler<OrderStatusChangedToPaidDomainEvent>
{ {
private readonly IOrderRepository _orderRepository; private readonly IOrderRepository _orderRepository;
private readonly ILoggerFactory _logger; private readonly ILoggerFactory _logger;
@ -26,11 +27,11 @@
_orderingIntegrationEventService = orderingIntegrationEventService; _orderingIntegrationEventService = orderingIntegrationEventService;
} }
public async Task Handle(OrderStatusChangedToPaidDomainEvent orderStatusChangedToPaidDomainEvent) public async Task Handle(OrderStatusChangedToPaidDomainEvent orderStatusChangedToPaidDomainEvent, CancellationToken cancellationToken)
{ {
_logger.CreateLogger(nameof(OrderStatusChangedToPaidDomainEventHandler)) _logger.CreateLogger(nameof(OrderStatusChangedToPaidDomainEventHandler))
.LogTrace($"Order with Id: {orderStatusChangedToPaidDomainEvent.OrderId} has been successfully updated with " + .LogTrace($"Order with Id: {orderStatusChangedToPaidDomainEvent.OrderId} has been successfully updated with " +
$"a status order id: {OrderStatus.Paid.Id}"); $"a status order id: {OrderStatus.Paid.Id}");
var orderStockList = orderStatusChangedToPaidDomainEvent.OrderItems var orderStockList = orderStatusChangedToPaidDomainEvent.OrderItems
.Select(orderItem => new OrderStockItem(orderItem.ProductId, orderItem.GetUnits())); .Select(orderItem => new OrderStockItem(orderItem.ProductId, orderItem.GetUnits()));

View File

@ -4,12 +4,13 @@ using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Buyer
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Ordering.Domain.Events; using Ordering.Domain.Events;
using System; using System;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Ordering.API.Application.DomainEventHandlers.OrderStartedEvent namespace Ordering.API.Application.DomainEventHandlers.OrderStartedEvent
{ {
public class ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler public class ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler
: IAsyncNotificationHandler<OrderStartedDomainEvent> : INotificationHandler<OrderStartedDomainEvent>
{ {
private readonly ILoggerFactory _logger; private readonly ILoggerFactory _logger;
private readonly IBuyerRepository _buyerRepository; private readonly IBuyerRepository _buyerRepository;
@ -22,7 +23,7 @@ namespace Ordering.API.Application.DomainEventHandlers.OrderStartedEvent
_logger = logger ?? throw new ArgumentNullException(nameof(logger)); _logger = logger ?? throw new ArgumentNullException(nameof(logger));
} }
public async Task Handle(OrderStartedDomainEvent orderStartedEvent) public async Task Handle(OrderStartedDomainEvent orderStartedEvent, CancellationToken cancellationToken)
{ {
var cardTypeId = (orderStartedEvent.CardTypeId != 0) ? orderStartedEvent.CardTypeId : 1; var cardTypeId = (orderStartedEvent.CardTypeId != 0) ? orderStartedEvent.CardTypeId : 1;
var buyer = await _buyerRepository.FindAsync(orderStartedEvent.UserId); var buyer = await _buyerRepository.FindAsync(orderStartedEvent.UserId);

View File

@ -8,9 +8,10 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Ordering.API.Application.IntegrationEvents; using Ordering.API.Application.IntegrationEvents;
using Ordering.API.Application.IntegrationEvents.Events; using Ordering.API.Application.IntegrationEvents.Events;
using System.Threading;
public class OrderStatusChangedToStockConfirmedDomainEventHandler public class OrderStatusChangedToStockConfirmedDomainEventHandler
: IAsyncNotificationHandler<OrderStatusChangedToStockConfirmedDomainEvent> : INotificationHandler<OrderStatusChangedToStockConfirmedDomainEvent>
{ {
private readonly IOrderRepository _orderRepository; private readonly IOrderRepository _orderRepository;
private readonly ILoggerFactory _logger; private readonly ILoggerFactory _logger;
@ -25,7 +26,7 @@
_orderingIntegrationEventService = orderingIntegrationEventService; _orderingIntegrationEventService = orderingIntegrationEventService;
} }
public async Task Handle(OrderStatusChangedToStockConfirmedDomainEvent orderStatusChangedToStockConfirmedDomainEvent) public async Task Handle(OrderStatusChangedToStockConfirmedDomainEvent orderStatusChangedToStockConfirmedDomainEvent, CancellationToken cancellationToken)
{ {
_logger.CreateLogger(nameof(OrderStatusChangedToStockConfirmedDomainEventHandler)) _logger.CreateLogger(nameof(OrderStatusChangedToStockConfirmedDomainEventHandler))
.LogTrace($"Order with Id: {orderStatusChangedToStockConfirmedDomainEvent.OrderId} has been successfully updated with " + .LogTrace($"Order with Id: {orderStatusChangedToStockConfirmedDomainEvent.OrderId} has been successfully updated with " +

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80

View File

@ -21,11 +21,11 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Autof
// Register all the Command classes (they implement IAsyncRequestHandler) in assembly holding the Commands // Register all the Command classes (they implement IAsyncRequestHandler) in assembly holding the Commands
builder.RegisterAssemblyTypes(typeof(CreateOrderCommand).GetTypeInfo().Assembly) builder.RegisterAssemblyTypes(typeof(CreateOrderCommand).GetTypeInfo().Assembly)
.AsClosedTypesOf(typeof(IAsyncRequestHandler<,>)); .AsClosedTypesOf(typeof(IRequestHandler<,>));
// Register the DomainEventHandler classes (they implement IAsyncNotificationHandler<>) in assembly holding the Domain Events // Register the DomainEventHandler classes (they implement IAsyncNotificationHandler<>) in assembly holding the Domain Events
builder.RegisterAssemblyTypes(typeof(ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler).GetTypeInfo().Assembly) builder.RegisterAssemblyTypes(typeof(ValidateOrAddBuyerAggregateWhenOrderStartedDomainEventHandler).GetTypeInfo().Assembly)
.AsClosedTypesOf(typeof(IAsyncNotificationHandler<>)); .AsClosedTypesOf(typeof(INotificationHandler<>));
// Register the Command's Validators (Validators based on FluentValidation library) // Register the Command's Validators (Validators based on FluentValidation library)
builder builder

View File

@ -30,20 +30,20 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="FluentValidation.AspNetCore" Version="7.2.0" /> <PackageReference Include="FluentValidation.AspNetCore" Version="7.3.1" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="3.0.0" /> <PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="4.0.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" /> <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="MediatR" Version="3.0.1" /> <PackageReference Include="MediatR" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="1.1.0" />
<PackageReference Include="System.Reflection" Version="4.3.0" /> <PackageReference Include="System.Reflection" Version="4.3.0" />
<PackageReference Include="Dapper" Version="1.50.2" /> <PackageReference Include="Dapper" Version="1.50.4" />
<PackageReference Include="System.ValueTuple" Version="4.4.0" /> <PackageReference Include="System.ValueTuple" Version="4.4.0" />
<PackageReference Include="Polly" Version="5.3.1" /> <PackageReference Include="Polly" Version="5.6.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,8 +5,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="MediatR" Version="3.0.1" /> <PackageReference Include="MediatR" Version="4.0.1" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="3.0.0" /> <PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="4.0.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.4.0" /> <PackageReference Include="System.Reflection.TypeExtensions" Version="4.4.0" />
</ItemGroup> </ItemGroup>

View File

@ -9,8 +9,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.0.0" />
</ItemGroup> </ItemGroup>

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80

View File

@ -11,12 +11,11 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" /> <ProjectReference Include="..\..\..\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj" />

View File

@ -16,7 +16,6 @@ using Payment.API.IntegrationEvents.Events;
using RabbitMQ.Client; using RabbitMQ.Client;
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Swashbuckle.AspNetCore.Swagger;
using Microsoft.ApplicationInsights.Extensibility; using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.ServiceFabric; using Microsoft.ApplicationInsights.ServiceFabric;

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80
@ -6,7 +6,6 @@ FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src WORKDIR /src
COPY eShopOnContainers-ServicesAndWebApps.sln ./ COPY eShopOnContainers-ServicesAndWebApps.sln ./
COPY src/Web/WebMVC/WebMVC.csproj src/Web/WebMVC/ COPY src/Web/WebMVC/WebMVC.csproj src/Web/WebMVC/
COPY src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj src/BuildingBlocks/DataProtection/DataProtection/
COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/ COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/
COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/ COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/
COPY src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj src/BuildingBlocks/Resilience/Resilience.Http/ COPY src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj src/BuildingBlocks/Resilience/Resilience.Http/

View File

@ -3,7 +3,6 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
<UserSecretsId>aspnet-Microsoft.eShopOnContainers-946ae052-8305-4a99-965b-ec8636ddbae3</UserSecretsId> <UserSecretsId>aspnet-Microsoft.eShopOnContainers-946ae052-8305-4a99-965b-ec8636ddbae3</UserSecretsId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup> </PropertyGroup>
@ -22,10 +21,10 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.2" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.3" />
</ItemGroup> </ItemGroup>
<!--<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish"> <!--<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
@ -36,7 +35,7 @@
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.5.357" /> <DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.5.357" />
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80
@ -6,7 +6,6 @@ FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src WORKDIR /src
COPY eShopOnContainers-ServicesAndWebApps.sln ./ COPY eShopOnContainers-ServicesAndWebApps.sln ./
COPY src/Web/WebSPA/WebSPA.csproj src/Web/WebSPA/ COPY src/Web/WebSPA/WebSPA.csproj src/Web/WebSPA/
COPY src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj src/BuildingBlocks/DataProtection/DataProtection/
COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/ COPY src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/
COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/ COPY src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/
RUN dotnet restore RUN dotnet restore

View File

@ -30,8 +30,8 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.Redis" Version="0.3.1" />
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
</ItemGroup> </ItemGroup>
@ -49,7 +49,7 @@
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="2.0.0" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
</ItemGroup> </ItemGroup>
<!-- workaround for https://github.com/aspnet/websdk/issues/114 --> <!-- workaround for https://github.com/aspnet/websdk/issues/114 -->

View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:2.0 AS base FROM microsoft/aspnetcore:2.0.3 AS base
WORKDIR /app WORKDIR /app
EXPOSE 80 EXPOSE 80

View File

@ -8,11 +8,11 @@
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" /> <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" /> <PackageReference Include="Microsoft.ApplicationInsights.DependencyCollector" Version="2.4.1" />
<PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.Kubernetes" Version="1.0.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.0-beta1" /> <PackageReference Include="Microsoft.ApplicationInsights.ServiceFabric" Version="2.0.1-beta1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" /> <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\BuildingBlocks\HealthChecks\src\Microsoft.AspNetCore.HealthChecks\Microsoft.AspNetCore.HealthChecks.csproj" /> <ProjectReference Include="..\..\BuildingBlocks\HealthChecks\src\Microsoft.AspNetCore.HealthChecks\Microsoft.AspNetCore.HealthChecks.csproj" />

View File

@ -39,7 +39,8 @@ namespace UnitTest.Ordering.Application
//Act //Act
var handler = new IdentifiedCommandHandler<CreateOrderCommand, bool>(_mediator.Object, _requestManager.Object); var handler = new IdentifiedCommandHandler<CreateOrderCommand, bool>(_mediator.Object, _requestManager.Object);
var result = await handler.Handle(fakeOrderCmd); var cltToken = new System.Threading.CancellationToken();
var result = await handler.Handle(fakeOrderCmd, cltToken);
//Assert //Assert
Assert.True(result); Assert.True(result);
@ -61,7 +62,8 @@ namespace UnitTest.Ordering.Application
//Act //Act
var handler = new IdentifiedCommandHandler<CreateOrderCommand, bool>(_mediator.Object, _requestManager.Object); var handler = new IdentifiedCommandHandler<CreateOrderCommand, bool>(_mediator.Object, _requestManager.Object);
var result = await handler.Handle(fakeOrderCmd); var cltToken = new System.Threading.CancellationToken();
var result = await handler.Handle(fakeOrderCmd, cltToken);
//Assert //Assert
Assert.False(result); Assert.False(result);

View File

@ -49,7 +49,8 @@ namespace UnitTest.Ordering.Application
//Act //Act
var handler = new CreateOrderCommandHandler(_mediator.Object, _orderRepositoryMock.Object, _identityServiceMock.Object); var handler = new CreateOrderCommandHandler(_mediator.Object, _orderRepositoryMock.Object, _identityServiceMock.Object);
var result = await handler.Handle(fakeOrderCmd); var cltToken = new System.Threading.CancellationToken();
var result = await handler.Handle(fakeOrderCmd, cltToken);
//Assert //Assert
Assert.False(result); Assert.False(result);

View File

@ -23,7 +23,7 @@
<PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" /> <PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
<PackageReference Include="MediatR" Version="3.0.1" /> <PackageReference Include="MediatR" Version="4.0.1" />
<PackageReference Include="Moq" Version="4.7.142" /> <PackageReference Include="Moq" Version="4.7.142" />
<PackageReference Include="xunit" Version="2.3.0" /> <PackageReference Include="xunit" Version="2.3.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.0" /> <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.0" />