Skip to content

Commit

Permalink
Updates to .NET 6.0 (dotnet-architecture#1786)
Browse files Browse the repository at this point in the history
* Seeking feedback: Build and run on .Net 6 preview 6 (dotnet-architecture#1734)

* Updgrade build and hosting machines to .net6 latest

* Target .net 6

* ILogger is ambiguous?

* More ILogger ambiguity

* Use preview 6... seeing errors in preview 7...

* Of course the SDK version is different :)

* downgrade the last nonworking component

* Only restore the packages we need for the one off service stuck in .net 5

* Downgrade development docker files to use the preview 6 sdk

* Updates `basket-api` to .NET 6 (dotnet-architecture#1742)

* Use global usings

* Use file-scoped namespaces

* Updates docker images to preview 7

* Created a new migration plan

* Included global usings for identity project

* Updated docker file to preview version to 7

* Updated dockerfiles

* Merged conent from Startup.cs to Program.cs

* Removed Starup.cs

* Removed unnecessary files

* Revert "Removed unnecessary files"

This reverts commit 536bddc.

* Revert "Removed Starup.cs"

This reverts commit 46175d7.

* Revert "Merged conent from Startup.cs to Program.cs"

This reverts commit 2766ea8.

* Removed extra spaces

* Updated basket-api project file

* Update src/Services/Basket/Basket.API/Grpc/BasketService.cs

Co-authored-by: David Pine <[email protected]>

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

* Moved the fully qualified namespace on top

* Updated relevant packages in basket.api project

* Updated relevant packages in identity.api project

Co-authored-by: David Pine <[email protected]>

* Updates all the services to .NET 6.0 (dotnet-architecture#1770)

* Created global using file for catalog.api

* Moved individual usings statements to globalusing

* Updated catalog.api project

* Fixed local run bug for catalog.api

* Included globalusing for payment.api

* Refactored namespace statement for payment.api

* Moved namespaces to ordering.domain project

* Included globalusing for ordering.domain project

* Included globalusings for ordering.infrastructure project

* Refactored namespaces for ordering.infrastructure project

* Updated relevant packages in ordering.infrastructure project

* Included globalusings for ordering.signalrHub project

* Moved all the namespace to globalusings

* Updated packages in ordering.signalrHub csproj file

* Refactored namespace statements in catalog.api project

* Fixed namespace name in ordering.domain

* Included global usings for ordering.api project

* Moved all usings to globalusing file

* Updated ordering.api csproj project

* Fixed bug in statup.cs

* Updated ordering.unittests.csproj file

* Included globalusings in webhooks.api project

* Moved using statements to globalusing file in webhooks.api

* Included globalusing for web.bff.shoppping aggregator project

* Moved namespaces to globalusing shopping aggregator

* Included globalusing mobile.bff.shoppping project

* Moved namespaces to globalusing file

* Included globalusing for eventbus project

* Moved namespaces to global usings for eventbus

* Included globalusing for EventBusRabbitMQ project

* Moved using statements to EventBusRabbitMQ project

* Included global using in EventBusServiceBus project

* Moved using statements to globalusing for EventBusServiceBus

* Included globalusing file for IntegrationEventLogEF project

* Move using statements to globalusing file

* Updated packages of IntegrationEventLogEF project

* Included globalusing to Devspaces.Support project

* Moved using statements to globalusing Devspaces

* Updated dependent packages for Devspaces.Support.csproj

* Fixed bug in Basket API

* Fixed bug in catalog.api

* Fixed bug Identity.API

* Included globalusing to Basket.UnitTest project

* Moved namespaces to Basket.UnitTest project

* Updated packages of Basket.UnitTest csproj

* Included globalusing for Basket.FunctionalTests project

* Included file-scoped namespaces Basket.FunctionalTests

* Updated packages of Basket.FunctionalTests.csproj file

* Updated catalog unit test project to Net 6.0

* Included global usings for Catalog.FunctionalTests

* Included file-scope namespace catalog.functionaltests

* Updated packages of catalog.functionaltest csproj

* Included MigrateDbContext method in HostExtensions

* Included globalusing for ordering.UnitTests project

* Included file-scope statement for Ordering.UnitTest project

* Included globalusing for Ordering.FunctionalTests

* Included file-scope namespace statement for using

* Updated packages in  Ordering.FunctionalTests.csproj

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

* Update src/Services/Ordering/Ordering.API/Startup.cs

Co-authored-by: David Pine <[email protected]>

* Update src/Services/Ordering/Ordering.Domain/Events/OrderStatusChangedToPaidDomainEvent.cs

Co-authored-by: David Pine <[email protected]>

* Update src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/EventHandling/OrderStatusChangedToSubmittedIntegrationEventHandler.cs

Co-authored-by: David Pine <[email protected]>

* Update src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToAwaitingValidationIntegrationEvent.cs

Co-authored-by: David Pine <[email protected]>

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

Co-authored-by: David Pine <[email protected]>

* Updates WebMVC to .NET 6.0 (dotnet-architecture#1773)

* Included globalusing WebMVC

* Included file scope namespaces for all files

* Updated dockerfile

* Updated packages to WebMVC

* Fixes few bugs in Net 6.0 service migration (dotnet-architecture#1774)

* Created global using file for catalog.api

* Moved individual usings statements to globalusing

* Updated catalog.api project

* Fixed local run bug for catalog.api

* Included globalusing for payment.api

* Refactored namespace statement for payment.api

* Moved namespaces to ordering.domain project

* Included globalusing for ordering.domain project

* Included globalusings for ordering.infrastructure project

* Refactored namespaces for ordering.infrastructure project

* Updated relevant packages in ordering.infrastructure project

* Included globalusings for ordering.signalrHub project

* Moved all the namespace to globalusings

* Updated packages in ordering.signalrHub csproj file

* Refactored namespace statements in catalog.api project

* Fixed namespace name in ordering.domain

* Included global usings for ordering.api project

* Moved all usings to globalusing file

* Updated ordering.api csproj project

* Fixed bug in statup.cs

* Updated ordering.unittests.csproj file

* Included globalusings in webhooks.api project

* Moved using statements to globalusing file in webhooks.api

* Included globalusing for web.bff.shoppping aggregator project

* Moved namespaces to globalusing shopping aggregator

* Included globalusing mobile.bff.shoppping project

* Moved namespaces to globalusing file

* Included globalusing for eventbus project

* Moved namespaces to global usings for eventbus

* Included globalusing for EventBusRabbitMQ project

* Moved using statements to EventBusRabbitMQ project

* Included global using in EventBusServiceBus project

* Moved using statements to globalusing for EventBusServiceBus

* Included globalusing file for IntegrationEventLogEF project

* Move using statements to globalusing file

* Updated packages of IntegrationEventLogEF project

* Included globalusing to Devspaces.Support project

* Moved using statements to globalusing Devspaces

* Updated dependent packages for Devspaces.Support.csproj

* Fixed bug in Basket API

* Fixed bug in catalog.api

* Fixed bug Identity.API

* Included globalusing to Basket.UnitTest project

* Moved namespaces to Basket.UnitTest project

* Updated packages of Basket.UnitTest csproj

* Included globalusing for Basket.FunctionalTests project

* Included file-scoped namespaces Basket.FunctionalTests

* Updated packages of Basket.FunctionalTests.csproj file

* Updated catalog unit test project to Net 6.0

* Included global usings for Catalog.FunctionalTests

* Included file-scope namespace catalog.functionaltests

* Updated packages of catalog.functionaltest csproj

* Included MigrateDbContext method in HostExtensions

* Included globalusing for ordering.UnitTests project

* Included file-scope statement for Ordering.UnitTest project

* Included globalusing for Ordering.FunctionalTests

* Included file-scope namespace statement for using

* Updated packages in  Ordering.FunctionalTests.csproj

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

* Update src/Services/Ordering/Ordering.API/Startup.cs

Co-authored-by: David Pine <[email protected]>

* Update src/Services/Ordering/Ordering.Domain/Events/OrderStatusChangedToPaidDomainEvent.cs

Co-authored-by: David Pine <[email protected]>

* Update src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/EventHandling/OrderStatusChangedToSubmittedIntegrationEventHandler.cs

Co-authored-by: David Pine <[email protected]>

* Update src/Services/Ordering/Ordering.SignalrHub/IntegrationEvents/Events/OrderStatusChangedToAwaitingValidationIntegrationEvent.cs

Co-authored-by: David Pine <[email protected]>

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

* Apply suggestions from code review

Co-authored-by: David Pine <[email protected]>

* Fixed bugs in Mobile.BFF.Shopping project

* Fixed bugs in Web.Bff.Shopping aggregator project

* Fixed bugs in EventBusServiceBus project

* Fixed bug in Mobile.Bff.Shopping project

Co-authored-by: David Pine <[email protected]>

* Updates webhook client project to .NET 6.0 (dotnet-architecture#1777)

* Included globalusing file for webhookclient

* Included file scope namespaces for Webhookclient

* Updated packages in WebHookClient project

* Updates webspa project to Net 6.0 (dotnet-architecture#1778)

* Included globalusing in webspa project

* Included file scoped namespace for webspa project

* Updated packages in WebSPA project

* Updates the Application.FunctionalTests project to .NET 6.0 (dotnet-architecture#1781)

* Included globalusing in Application.FunctionalTests project

* Included file scoped namespace

* Renamed Azure.Messaging.ServiceBus namespace

* Updates .NET version of Dockerfile to 6.0 (dotnet-architecture#1785)

* Updatated package versions to RC2

* Updated package versions to RC2

* Updated Dockerfiles to .NET 6 RC2

* Changed docker file tag to 6.0

* Updated Program class

* Updated globalusing file

* Removed preview tag reference from Dockerfile.develop file

* Updated dotnet version to .NET 6.0

* Updated all packages to the .NET 6.0

* Removed RC tag from dockerfile

* Fixed bundleconfig json

* Updated readme files

* Fixed ingress yaml indentation

* Included globalusing for WebStatus project

* Updated WebStatus project to .NET 6.0

* Included scoped namespace

* Updated Dockerfile of WebStatus to .NET 6.0

Co-authored-by: Josh Coleman <[email protected]>
Co-authored-by: David Pine <[email protected]>
  • Loading branch information
3 people authored Nov 15, 2021
1 parent 42abcad commit 630cb35
Show file tree
Hide file tree
Showing 537 changed files with 14,789 additions and 16,107 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/catalog-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
env:
SERVICE: catalog-api
IMAGE: catalog.api
DOTNET_VERSION: 5.0.x
DOTNET_VERSION: 6.0.x
PROJECT_PATH: Services/Catalog/Catalog.API
TESTS_PATH: Services/Catalog/Catalog.UnitTests

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ordering-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
env:
SERVICE: ordering-api
IMAGE: ordering.api
DOTNET_VERSION: 5.0.x
DOTNET_VERSION: 6.0.x
PROJECT_PATH: Services/Ordering/Ordering.API
TESTS_PATH: Services/Ordering/Ordering.UnitTests

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ In the future, more features will be implemented in the advanced scenario.
**NEWS / ANNOUNCEMENTS**
Do you want 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

## Updated for .NET 5
## Updated for .NET 6

eShopOnContainers is updated to .NET 5 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions with several significant changes.
eShopOnContainers is updated to .NET 6 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions with several significant changes.

**See more details in the [Release notes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Release-notes) wiki page**.

Expand All @@ -86,7 +86,7 @@ eShopOnContainers is updated to .NET 5 "wave" of technologies. Not just compilat
### Architecture overview

This reference application is cross-platform at the server and client-side, thanks to .NET 5 services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS, or Windows/UWP plus any browser for the client web apps.
This reference application is cross-platform at the server and client-side, thanks to .NET 6 services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS, or Windows/UWP plus any browser for the client web apps.
The architecture proposes a microservice oriented architecture implementation with multiple autonomous microservices (each one owning its own data/db) and implementing different approaches within each microservice (simple CRUD vs. DDD/CQRS patterns) using HTTP as the communication protocol between the client apps and the microservices and supports asynchronous communication for data updates propagation across multiple services based on Integration Events and an Event Bus (a light message broker, to choose between RabbitMQ or Azure Service Bus, underneath) plus other features defined at the [roadmap](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Roadmap).

![](img/eshop_logo.png)
Expand Down
7 changes: 5 additions & 2 deletions branch-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

Following are the most important branches:

- `dev`: Contains the latest code **and it is the branch actively developed**. Note that **all PRs must be against the `dev` branch to be considered**. This branch is developed using `.NET 5`
- `main`: Synced time to time from `dev`.It contains "stable" code, although not the latest one. Right now, this branch contains changes specific to `.NET Core 3.1`
- `dev`: Contains the latest code **and it is the branch actively developed**. Note that **all PRs must be against the `dev` branch to be considered**. This branch is developed using `.NET 6`
- `release/net-5`: Contains the code changes specific to the `.NET 5`
- `release/net-3.1.1`: Contains the code changes specific to the `.NET 3.1`

> [!DISCLAIMER]: The `main` branch contains the old code base and will get obsolete in the future. So it's recommended to refer to different [tags](https://github.com/dotnet-architecture/eShopOnContainers/tags) to avoid any confusion.
Any other branch is considered temporary and could be deleted at any time. Do not submit any PR against them!

Expand Down
38 changes: 20 additions & 18 deletions deploy/k8s/nginx-ingress/local-dockerk8s/mvc-fix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ metadata:
namespace: default
spec:
rules:
http:
paths:
- path: /webmvc
pathType: Prefix
backend:
service:
name: webmvc
port:
number: 80
- host: localhost
http:
paths:
- path: /webmvc
pathType: Prefix
backend:
service:
name: webmvc
port:
number: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand All @@ -34,12 +35,13 @@ metadata:
namespace: default
spec:
rules:
http:
paths:
- path: /identity
pathType: Prefix
backend:
service:
name: identity
port:
number: 80
- host: localhost
http:
paths:
- path: /identity
pathType: Prefix
backend:
service:
name: identity
port:
number: 80
45 changes: 21 additions & 24 deletions src/ApiGateways/Mobile.Bff.Shopping/aggregator/Config/UrlsConfig.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
using System.Collections.Generic;
namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config;

namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config
public class UrlsConfig
{
public class UrlsConfig
public class CatalogOperations
{
public class CatalogOperations
{
public static string GetItemById(int id) => $"/api/v1/catalog/items/{id}";
public static string GetItemById(int id) => $"/api/v1/catalog/items/{id}";

public static string GetItemsById(IEnumerable<int> ids) => $"/api/v1/catalog/items?ids={string.Join(',', ids)}";
}
public static string GetItemsById(IEnumerable<int> ids) => $"/api/v1/catalog/items?ids={string.Join(',', ids)}";
}

public class BasketOperations
{
public static string GetItemById(string id) => $"/api/v1/basket/{id}";
public class BasketOperations
{
public static string GetItemById(string id) => $"/api/v1/basket/{id}";

public static string UpdateBasket() => "/api/v1/basket";
}
public static string UpdateBasket() => "/api/v1/basket";
}

public class OrdersOperations
{
public static string GetOrderDraft() => "/api/v1/orders/draft";
}
public class OrdersOperations
{
public static string GetOrderDraft() => "/api/v1/orders/draft";
}

public string Basket { get; set; }
public string Basket { get; set; }

public string Catalog { get; set; }
public string Catalog { get; set; }

public string Orders { get; set; }
public string Orders { get; set; }

public string GrpcBasket { get; set; }
public string GrpcBasket { get; set; }

public string GrpcCatalog { get; set; }
public string GrpcCatalog { get; set; }

public string GrpcOrdering { get; set; }
}
public string GrpcOrdering { get; set; }
}
Loading

0 comments on commit 630cb35

Please sign in to comment.