Added implict usings (#2125)
This commit is contained in:
		
							parent
							
								
									3b9560c26e
								
							
						
					
					
						commit
						508fa593d7
					
				| @ -1,24 +1,13 @@ | |||||||
| global using CatalogApi; | global using System.Text.Json; | ||||||
| global using Grpc.Core.Interceptors; | global using CatalogApi; | ||||||
| global using Grpc.Core; | global using Grpc.Core; | ||||||
|  | global using Grpc.Core.Interceptors; | ||||||
| global using GrpcBasket; | global using GrpcBasket; | ||||||
| global using Microsoft.AspNetCore.Authorization; | global using Microsoft.AspNetCore.Authorization; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.AspNetCore.Http; |  | ||||||
| global using Microsoft.AspNetCore.Mvc; | global using Microsoft.AspNetCore.Mvc; | ||||||
| global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config; | global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config; | ||||||
| global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Infrastructure; | global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Infrastructure; | ||||||
| global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models; | global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models; | ||||||
| global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services; | global using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services; | ||||||
| global using Microsoft.Extensions.Configuration; |  | ||||||
| global using Microsoft.Extensions.DependencyInjection; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using Microsoft.Extensions.Options; | global using Microsoft.Extensions.Options; | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.Linq; |  | ||||||
| global using System.Net.Http; |  | ||||||
| global using System.Net; |  | ||||||
| global using System.Text.Json; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using System; |  | ||||||
| global using Services.Common; | global using Services.Common; | ||||||
|  | |||||||
| @ -5,31 +5,15 @@ | |||||||
|     <AssemblyName>Mobile.Shopping.HttpAggregator</AssemblyName> |     <AssemblyName>Mobile.Shopping.HttpAggregator</AssemblyName> | ||||||
|     <RootNamespace>Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator</RootNamespace> |     <RootNamespace>Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator</RootNamespace> | ||||||
|     <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|     <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks> |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>     |  | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|   <ItemGroup> |  | ||||||
|     <Compile Remove="wwwroot\**" /> |  | ||||||
|     <Content Remove="wwwroot\**" /> |  | ||||||
|     <EmbeddedResource Remove="wwwroot\**" /> |  | ||||||
|     <None Remove="wwwroot\**" /> |  | ||||||
|   </ItemGroup> |  | ||||||
| 
 |  | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <PackageReference Include="Yarp.ReverseProxy" /> |     <PackageReference Include="Yarp.ReverseProxy" /> | ||||||
|     <PackageReference Include="AspNetCore.HealthChecks.UI.Client" /> |  | ||||||
|     <PackageReference Include="AspNetCore.HealthChecks.Uris" /> |     <PackageReference Include="AspNetCore.HealthChecks.Uris" /> | ||||||
|     <PackageReference Include="Google.Protobuf" /> |     <PackageReference Include="Google.Protobuf" /> | ||||||
|     <PackageReference Include="Grpc.AspNetCore.Server.ClientFactory" /> |     <PackageReference Include="Grpc.AspNetCore.Server.ClientFactory" /> | ||||||
|     <PackageReference Include="Grpc.Core" /> |  | ||||||
|     <PackageReference Include="Grpc.Net.ClientFactory" /> |  | ||||||
|     <PackageReference Include="Grpc.Tools" PrivateAssets="All" /> |     <PackageReference Include="Grpc.Tools" PrivateAssets="All" /> | ||||||
|     <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" /> |  | ||||||
|     <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" /> |  | ||||||
|     <PackageReference Include="Microsoft.AspNetCore.Diagnostics.HealthChecks" /> |  | ||||||
|     <PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" /> |  | ||||||
|     <PackageReference Include="Swashbuckle.AspNetCore" /> |  | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
| 
 | 
 | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  | |||||||
| @ -1,27 +1,13 @@ | |||||||
| global using System; | global using System.Text.Json; | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.Linq; |  | ||||||
| global using System.Net; |  | ||||||
| global using System.Net.Http; |  | ||||||
| global using System.Net.Http.Headers; |  | ||||||
| global using System.Text.Json; |  | ||||||
| global using System.Threading; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using CatalogApi; | global using CatalogApi; | ||||||
| global using Grpc.Core; | global using Grpc.Core; | ||||||
| global using Grpc.Core.Interceptors; | global using Grpc.Core.Interceptors; | ||||||
| global using GrpcBasket; | global using GrpcBasket; | ||||||
| global using Microsoft.AspNetCore.Authentication; |  | ||||||
| global using Microsoft.AspNetCore.Authorization; | global using Microsoft.AspNetCore.Authorization; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.AspNetCore.Http; |  | ||||||
| global using Microsoft.AspNetCore.Mvc; | global using Microsoft.AspNetCore.Mvc; | ||||||
| global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; | global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; | ||||||
| global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Infrastructure; | global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Infrastructure; | ||||||
| global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; | global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; | ||||||
| global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; | global using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; | ||||||
| global using Microsoft.Extensions.Configuration; |  | ||||||
| global using Microsoft.Extensions.DependencyInjection; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using Microsoft.Extensions.Options; | global using Microsoft.Extensions.Options; | ||||||
| global using Services.Common; | global using Services.Common; | ||||||
|  | |||||||
| @ -4,6 +4,7 @@ | |||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <AssemblyName>Web.Shopping.HttpAggregator</AssemblyName> |     <AssemblyName>Web.Shopping.HttpAggregator</AssemblyName> | ||||||
|     <RootNamespace>Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator</RootNamespace> |     <RootNamespace>Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator</RootNamespace> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBus</RootNamespace> |     <RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBus</RootNamespace> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,8 +1,4 @@ | |||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | global using System.Text.Json.Serialization; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | ||||||
| global using static Microsoft.eShopOnContainers.BuildingBlocks.EventBus.InMemoryEventBusSubscriptionsManager; | global using static Microsoft.eShopOnContainers.BuildingBlocks.EventBus.InMemoryEventBusSubscriptionsManager; | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.Linq; |  | ||||||
| global using System.Text.Json.Serialization; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using System; |  | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ</RootNamespace> |     <RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ</RootNamespace> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,16 +1,13 @@ | |||||||
| global using Microsoft.Extensions.Logging; | global using System.Net.Sockets; | ||||||
|  | global using System.Text; | ||||||
|  | global using System.Text.Json; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions; | ||||||
|  | global using Microsoft.Extensions.Logging; | ||||||
| global using Polly; | global using Polly; | ||||||
| global using Polly.Retry; | global using Polly.Retry; | ||||||
| global using RabbitMQ.Client; | global using RabbitMQ.Client; | ||||||
| global using RabbitMQ.Client.Events; | global using RabbitMQ.Client.Events; | ||||||
| global using RabbitMQ.Client.Exceptions; | global using RabbitMQ.Client.Exceptions; | ||||||
| global using System; |  | ||||||
| global using System.IO; |  | ||||||
| global using System.Net.Sockets; |  | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; |  | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; |  | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; |  | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Extensions; |  | ||||||
| global using System.Text; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using System.Text.Json; |  | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus</RootNamespace> |     <RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus</RootNamespace> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,13 +1,11 @@ | |||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | global using System.Text; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using System; |  | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using System.Text; |  | ||||||
| global using System.Text.Json; | global using System.Text.Json; | ||||||
| global using Azure.Messaging.ServiceBus; | global using Azure.Messaging.ServiceBus; | ||||||
| global using Azure.Messaging.ServiceBus.Administration; | global using Azure.Messaging.ServiceBus.Administration; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | ||||||
|  | global using Microsoft.Extensions.Logging; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,12 +1,8 @@ | |||||||
| global using Microsoft.EntityFrameworkCore; | global using System.ComponentModel.DataAnnotations.Schema; | ||||||
| global using Microsoft.EntityFrameworkCore.Metadata.Builders; |  | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; |  | ||||||
| global using System; |  | ||||||
| global using System.Text.Json; |  | ||||||
| global using System.ComponentModel.DataAnnotations.Schema; |  | ||||||
| global using System.Linq; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using Microsoft.EntityFrameworkCore.Storage; |  | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.Data.Common; | global using System.Data.Common; | ||||||
| global using System.Reflection; | global using System.Reflection; | ||||||
|  | global using System.Text.Json; | ||||||
|  | global using Microsoft.EntityFrameworkCore; | ||||||
|  | global using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||||||
|  | global using Microsoft.EntityFrameworkCore.Storage; | ||||||
|  | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF</RootNamespace> |     <RootNamespace>Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF</RootNamespace> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -2,23 +2,15 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks> |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|     <ItemGroup> |   <ItemGroup> | ||||||
|         <FrameworkReference Include="Microsoft.AspNetCore.App" /> |     <FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||||||
|     </ItemGroup> |   </ItemGroup> | ||||||
| 
 | 
 | ||||||
|     <ItemGroup> |   <ItemGroup> | ||||||
|     <PackageReference Include="Microsoft.EntityFrameworkCore.Design"> |  | ||||||
|       <PrivateAssets>all</PrivateAssets> |  | ||||||
|       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |  | ||||||
|     </PackageReference> |  | ||||||
|     <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" /> |  | ||||||
|     <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" /> |     <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" /> | ||||||
|     <PackageReference Include="Microsoft.EntityFrameworkCore" /> |  | ||||||
|     <PackageReference Include="Microsoft.Extensions.Configuration.Binder" /> |  | ||||||
|     <PackageReference Include="Microsoft.NETCore.Platforms" /> |  | ||||||
|     <PackageReference Include="Polly" /> |     <PackageReference Include="Polly" /> | ||||||
|     <PackageReference Include="System.Data.SqlClient" /> |     <PackageReference Include="System.Data.SqlClient" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|  | |||||||
| @ -1,77 +1,75 @@ | |||||||
| using System; | using System.Data.SqlClient; | ||||||
| using System.Data.SqlClient; |  | ||||||
| using Microsoft.EntityFrameworkCore; | using Microsoft.EntityFrameworkCore; | ||||||
| using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||||
| using Microsoft.Extensions.DependencyInjection; | using Microsoft.Extensions.DependencyInjection; | ||||||
| using Microsoft.Extensions.Logging; | using Microsoft.Extensions.Logging; | ||||||
| using Polly; | using Polly; | ||||||
| 
 | 
 | ||||||
| namespace Microsoft.AspNetCore.Hosting | namespace Microsoft.AspNetCore.Hosting; | ||||||
|  | 
 | ||||||
|  | public static class IWebHostExtensions | ||||||
| { | { | ||||||
|     public static class IWebHostExtensions |     public static bool IsInKubernetes(this IServiceProvider services) | ||||||
|     { |     { | ||||||
|         public static bool IsInKubernetes(this IServiceProvider services) |         var cfg = services.GetService<IConfiguration>(); | ||||||
|  |         var orchestratorType = cfg.GetValue<string>("OrchestratorType"); | ||||||
|  |         return orchestratorType?.ToUpper() == "K8S"; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public static IServiceProvider MigrateDbContext<TContext>(this IServiceProvider services, Action<TContext, IServiceProvider> seeder) where TContext : DbContext | ||||||
|  |     { | ||||||
|  |         var underK8s = services.IsInKubernetes(); | ||||||
|  | 
 | ||||||
|  |         using var scope = services.CreateScope(); | ||||||
|  |         var scopeServices = scope.ServiceProvider; | ||||||
|  |         var logger = scopeServices.GetRequiredService<ILogger<TContext>>(); | ||||||
|  |         var context = scopeServices.GetService<TContext>(); | ||||||
|  | 
 | ||||||
|  |         try | ||||||
|         { |         { | ||||||
|             var cfg = services.GetService<IConfiguration>(); |             logger.LogInformation("Migrating database associated with context {DbContextName}", typeof(TContext).Name); | ||||||
|             var orchestratorType = cfg.GetValue<string>("OrchestratorType"); |  | ||||||
|             return orchestratorType?.ToUpper() == "K8S"; |  | ||||||
|         } |  | ||||||
| 
 | 
 | ||||||
|         public static IServiceProvider MigrateDbContext<TContext>(this IServiceProvider services, Action<TContext, IServiceProvider> seeder) where TContext : DbContext |             if (underK8s) | ||||||
|         { |  | ||||||
|             var underK8s = services.IsInKubernetes(); |  | ||||||
| 
 |  | ||||||
|             using var scope = services.CreateScope(); |  | ||||||
|             var scopeServices = scope.ServiceProvider; |  | ||||||
|             var logger = scopeServices.GetRequiredService<ILogger<TContext>>(); |  | ||||||
|             var context = scopeServices.GetService<TContext>(); |  | ||||||
| 
 |  | ||||||
|             try |  | ||||||
|             { |             { | ||||||
|                 logger.LogInformation("Migrating database associated with context {DbContextName}", typeof(TContext).Name); |                 InvokeSeeder(seeder, context, scopeServices); | ||||||
| 
 |  | ||||||
|                 if (underK8s) |  | ||||||
|                 { |  | ||||||
|                     InvokeSeeder(seeder, context, scopeServices); |  | ||||||
|                 } |  | ||||||
|                 else |  | ||||||
|                 { |  | ||||||
|                     var retries = 10; |  | ||||||
|                     var retry = Policy.Handle<SqlException>() |  | ||||||
|                         .WaitAndRetry( |  | ||||||
|                             retryCount: retries, |  | ||||||
|                             sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), |  | ||||||
|                             onRetry: (exception, timeSpan, retry, ctx) => |  | ||||||
|                             { |  | ||||||
|                                 logger.LogWarning(exception, "[{prefix}] Error migrating database (attempt {retry} of {retries})", nameof(TContext), retry, retries); |  | ||||||
|                             }); |  | ||||||
| 
 |  | ||||||
|                     //if the sql server container is not created on run docker compose this |  | ||||||
|                     //migration can't fail for network related exception. The retry options for DbContext only  |  | ||||||
|                     //apply to transient exceptions |  | ||||||
|                     // Note that this is NOT applied when running some orchestrators (let the orchestrator to recreate the failing service) |  | ||||||
|                     retry.Execute(() => InvokeSeeder(seeder, context, scopeServices)); |  | ||||||
|                 } |  | ||||||
| 
 |  | ||||||
|                 logger.LogInformation("Migrated database associated with context {DbContextName}", typeof(TContext).Name); |  | ||||||
|             } |             } | ||||||
|             catch (Exception ex) |             else | ||||||
|             { |             { | ||||||
|                 logger.LogError(ex, "An error occurred while migrating the database used on context {DbContextName}", typeof(TContext).Name); |                 var retries = 10; | ||||||
|                 if (underK8s) |                 var retry = Policy.Handle<SqlException>() | ||||||
|                 { |                     .WaitAndRetry( | ||||||
|                     throw;          // Rethrow under k8s because we rely on k8s to re-run the pod |                         retryCount: retries, | ||||||
|                 } |                         sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), | ||||||
|  |                         onRetry: (exception, timeSpan, retry, ctx) => | ||||||
|  |                         { | ||||||
|  |                             logger.LogWarning(exception, "[{prefix}] Error migrating database (attempt {retry} of {retries})", nameof(TContext), retry, retries); | ||||||
|  |                         }); | ||||||
|  | 
 | ||||||
|  |                 //if the sql server container is not created on run docker compose this | ||||||
|  |                 //migration can't fail for network related exception. The retry options for DbContext only  | ||||||
|  |                 //apply to transient exceptions | ||||||
|  |                 // Note that this is NOT applied when running some orchestrators (let the orchestrator to recreate the failing service) | ||||||
|  |                 retry.Execute(() => InvokeSeeder(seeder, context, scopeServices)); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             return services; |             logger.LogInformation("Migrated database associated with context {DbContextName}", typeof(TContext).Name); | ||||||
|  |         } | ||||||
|  |         catch (Exception ex) | ||||||
|  |         { | ||||||
|  |             logger.LogError(ex, "An error occurred while migrating the database used on context {DbContextName}", typeof(TContext).Name); | ||||||
|  |             if (underK8s) | ||||||
|  |             { | ||||||
|  |                 throw;          // Rethrow under k8s because we rely on k8s to re-run the pod | ||||||
|  |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         private static void InvokeSeeder<TContext>(Action<TContext, IServiceProvider> seeder, TContext context, IServiceProvider services) |         return services; | ||||||
|             where TContext : DbContext |     } | ||||||
|         { | 
 | ||||||
|             context.Database.Migrate(); |     private static void InvokeSeeder<TContext>(Action<TContext, IServiceProvider> seeder, TContext context, IServiceProvider services) | ||||||
|             seeder(context, services); |         where TContext : DbContext | ||||||
|         } |     { | ||||||
|  |         context.Database.Migrate(); | ||||||
|  |         seeder(context, services); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk.Web"> | <Project Sdk="Microsoft.NET.Sdk.Web"> | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|     <UserSecretsId>2964ec8e-0d48-4541-b305-94cab537f867</UserSecretsId> |     <UserSecretsId>2964ec8e-0d48-4541-b305-94cab537f867</UserSecretsId> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  | |||||||
| @ -1,10 +1,6 @@ | |||||||
| global using System; | global using System.ComponentModel.DataAnnotations; | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.ComponentModel.DataAnnotations; |  | ||||||
| global using System.Linq; |  | ||||||
| global using System.Security.Claims; | global using System.Security.Claims; | ||||||
| global using System.Text.Json; | global using System.Text.Json; | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using Basket.API.IntegrationEvents.EventHandling; | global using Basket.API.IntegrationEvents.EventHandling; | ||||||
| global using Basket.API.IntegrationEvents.Events; | global using Basket.API.IntegrationEvents.Events; | ||||||
| global using Basket.API.Model; | global using Basket.API.Model; | ||||||
| @ -12,8 +8,6 @@ global using Basket.API.Repositories; | |||||||
| global using Grpc.Core; | global using Grpc.Core; | ||||||
| global using GrpcBasket; | global using GrpcBasket; | ||||||
| global using Microsoft.AspNetCore.Authorization; | global using Microsoft.AspNetCore.Authorization; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.AspNetCore.Http; |  | ||||||
| global using Microsoft.AspNetCore.Mvc; | global using Microsoft.AspNetCore.Mvc; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | ||||||
| @ -21,8 +15,5 @@ global using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.E | |||||||
| global using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events; | global using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events; | ||||||
| global using Microsoft.eShopOnContainers.Services.Basket.API.Model; | global using Microsoft.eShopOnContainers.Services.Basket.API.Model; | ||||||
| global using Microsoft.eShopOnContainers.Services.Basket.API.Services; | global using Microsoft.eShopOnContainers.Services.Basket.API.Services; | ||||||
| global using Microsoft.Extensions.Configuration; |  | ||||||
| global using Microsoft.Extensions.DependencyInjection; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using Services.Common; | global using Services.Common; | ||||||
| global using StackExchange.Redis; | global using StackExchange.Redis; | ||||||
|  | |||||||
| @ -5,6 +5,7 @@ | |||||||
|     <AssemblyName>Catalog.API</AssemblyName> |     <AssemblyName>Catalog.API</AssemblyName> | ||||||
|     <PackageId>Catalog.API</PackageId> |     <PackageId>Catalog.API</PackageId> | ||||||
|     <UserSecretsId>aspnet-Catalog.API-20161122013618</UserSecretsId> |     <UserSecretsId>aspnet-Catalog.API-20161122013618</UserSecretsId> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,17 +1,10 @@ | |||||||
| global using System; | global using System.Data.Common; | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.Data.Common; |  | ||||||
| global using System.Data.SqlClient; | global using System.Data.SqlClient; | ||||||
| global using System.Globalization; | global using System.Globalization; | ||||||
| global using System.IO; |  | ||||||
| global using System.IO.Compression; | global using System.IO.Compression; | ||||||
| global using System.Linq; |  | ||||||
| global using System.Text.RegularExpressions; | global using System.Text.RegularExpressions; | ||||||
| global using System.Threading.Tasks; | global using Catalog.API.Apis; | ||||||
| global using Grpc.Core; | global using Grpc.Core; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.AspNetCore.Hosting; |  | ||||||
| global using Microsoft.AspNetCore.Http; |  | ||||||
| global using Microsoft.AspNetCore.Mvc; | global using Microsoft.AspNetCore.Mvc; | ||||||
| global using Microsoft.EntityFrameworkCore; | global using Microsoft.EntityFrameworkCore; | ||||||
| global using Microsoft.EntityFrameworkCore.Design; | global using Microsoft.EntityFrameworkCore.Design; | ||||||
| @ -32,11 +25,7 @@ global using Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents. | |||||||
| global using Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events; | global using Microsoft.eShopOnContainers.Services.Catalog.API.IntegrationEvents.Events; | ||||||
| global using Microsoft.eShopOnContainers.Services.Catalog.API.Model; | global using Microsoft.eShopOnContainers.Services.Catalog.API.Model; | ||||||
| global using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; | global using Microsoft.eShopOnContainers.Services.Catalog.API.ViewModel; | ||||||
| global using Microsoft.Extensions.Configuration; |  | ||||||
| global using Microsoft.Extensions.DependencyInjection; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using Microsoft.Extensions.Options; | global using Microsoft.Extensions.Options; | ||||||
| global using Polly; | global using Polly; | ||||||
| global using Polly.Retry; | global using Polly.Retry; | ||||||
| global using Services.Common; | global using Services.Common; | ||||||
| global using Catalog.API.Apis; |  | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ | |||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <UserSecretsId>aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5</UserSecretsId> |     <UserSecretsId>aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5</UserSecretsId> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,12 +1,6 @@ | |||||||
| global using System; | global using System.Data.Common; | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.Data.Common; |  | ||||||
| global using System.Data.SqlClient; | global using System.Data.SqlClient; | ||||||
| global using System.IO; |  | ||||||
| global using System.Linq; |  | ||||||
| global using System.Runtime.Serialization; | global using System.Runtime.Serialization; | ||||||
| global using System.Threading; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using Azure.Identity; | global using Azure.Identity; | ||||||
| global using Dapper; | global using Dapper; | ||||||
| global using FluentValidation; | global using FluentValidation; | ||||||
| @ -14,9 +8,6 @@ global using Google.Protobuf.Collections; | |||||||
| global using Grpc.Core; | global using Grpc.Core; | ||||||
| global using MediatR; | global using MediatR; | ||||||
| global using Microsoft.AspNetCore.Authorization; | global using Microsoft.AspNetCore.Authorization; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.AspNetCore.Hosting; |  | ||||||
| global using Microsoft.AspNetCore.Http; |  | ||||||
| global using Microsoft.AspNetCore.Mvc; | global using Microsoft.AspNetCore.Mvc; | ||||||
| global using Microsoft.EntityFrameworkCore; | global using Microsoft.EntityFrameworkCore; | ||||||
| global using Microsoft.EntityFrameworkCore.Design; | global using Microsoft.EntityFrameworkCore.Design; | ||||||
| @ -45,9 +36,6 @@ global using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork; | |||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure; | global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; | global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Repositories; | global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Repositories; | ||||||
| global using Microsoft.Extensions.Configuration; |  | ||||||
| global using Microsoft.Extensions.DependencyInjection; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using Microsoft.Extensions.Options; | global using Microsoft.Extensions.Options; | ||||||
| global using Polly; | global using Polly; | ||||||
| global using Polly.Retry; | global using Polly.Retry; | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ | |||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <UserSecretsId>aspnet-Ordering.API-20161122013547</UserSecretsId> |     <UserSecretsId>aspnet-Ordering.API-20161122013547</UserSecretsId> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|     <RootNamespace>Microsoft.eShopOnContainers.Services.Ordering.API</RootNamespace> |     <RootNamespace>Microsoft.eShopOnContainers.Services.Ordering.API</RootNamespace> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  | |||||||
| @ -1,10 +1,8 @@ | |||||||
| global using System; | global using Microsoft.AspNetCore.Builder; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.Extensions.Configuration; | global using Microsoft.Extensions.Configuration; | ||||||
| global using Microsoft.Extensions.DependencyInjection; | global using Microsoft.Extensions.DependencyInjection; | ||||||
| global using Microsoft.Extensions.Hosting; | global using Microsoft.Extensions.Hosting; | ||||||
| global using Microsoft.Extensions.Logging; | global using Microsoft.Extensions.Logging; | ||||||
| global using Ordering.BackgroundTasks; |  | ||||||
| global using Ordering.BackgroundTasks.Extensions; | global using Ordering.BackgroundTasks.Extensions; | ||||||
| global using Ordering.BackgroundTasks.Services; | global using Ordering.BackgroundTasks.Services; | ||||||
| global using Services.Common; | global using Services.Common; | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <UserSecretsId>dotnet-Ordering.BackgroundTasks-9D3E1DD6-405B-447F-8AAB-1708B36D260E</UserSecretsId> |     <UserSecretsId>dotnet-Ordering.BackgroundTasks-9D3E1DD6-405B-447F-8AAB-1708B36D260E</UserSecretsId> | ||||||
|     <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>     |     <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>     | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  | |||||||
| @ -1,12 +1,7 @@ | |||||||
| global using global::Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions; | global using System.Reflection; | ||||||
|  | global using global::Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions; | ||||||
| global using MediatR; | global using MediatR; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork; |  | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Events; | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Events; | ||||||
| global using System.Collections.Generic; | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork; | ||||||
| global using System.Linq; |  | ||||||
| global using System.Reflection; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using System.Threading; |  | ||||||
| global using System; |  | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  | |||||||
| @ -1,17 +1,12 @@ | |||||||
| global using MediatR; | global using System.Data; | ||||||
|  | global using MediatR; | ||||||
|  | global using Microsoft.EntityFrameworkCore; | ||||||
| global using Microsoft.EntityFrameworkCore.Design; | global using Microsoft.EntityFrameworkCore.Design; | ||||||
| global using Microsoft.EntityFrameworkCore.Metadata.Builders; | global using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||||||
| global using Microsoft.EntityFrameworkCore.Storage; | global using Microsoft.EntityFrameworkCore.Storage; | ||||||
| global using Microsoft.EntityFrameworkCore; |  | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork; |  | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; |  | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions; | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions; | ||||||
|  | global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Seedwork; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.EntityConfigurations; | global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.EntityConfigurations; | ||||||
| global using System.Data; | global using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; | ||||||
| global using System.Linq; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using System.Threading; |  | ||||||
| global using System; |  | ||||||
| global using System.Collections.Generic; |  | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  | |||||||
| @ -1,9 +1,5 @@ | |||||||
| global using System; | global using Microsoft.AspNetCore.Authentication.JwtBearer; | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using Microsoft.AspNetCore.Authentication.JwtBearer; |  | ||||||
| global using Microsoft.AspNetCore.Authorization; | global using Microsoft.AspNetCore.Authorization; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.AspNetCore.SignalR; | global using Microsoft.AspNetCore.SignalR; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | ||||||
| @ -11,7 +7,4 @@ global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub; | |||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents; | global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents.EventHandling; | global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents.EventHandling; | ||||||
| global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents.Events; | global using Microsoft.eShopOnContainers.Services.Ordering.SignalrHub.IntegrationEvents.Events; | ||||||
| global using Microsoft.Extensions.Configuration; |  | ||||||
| global using Microsoft.Extensions.DependencyInjection; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using Services.Common; | global using Services.Common; | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,11 +1,7 @@ | |||||||
| global using System.Threading.Tasks; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; |  | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | ||||||
| global using Microsoft.eShopOnContainers.Payment.API; | global using Microsoft.eShopOnContainers.Payment.API; | ||||||
| global using Microsoft.eShopOnContainers.Payment.API.IntegrationEvents.EventHandling; | global using Microsoft.eShopOnContainers.Payment.API.IntegrationEvents.EventHandling; | ||||||
| global using Microsoft.eShopOnContainers.Payment.API.IntegrationEvents.Events; | global using Microsoft.eShopOnContainers.Payment.API.IntegrationEvents.Events; | ||||||
| global using Microsoft.Extensions.DependencyInjection; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using Microsoft.Extensions.Options; | global using Microsoft.Extensions.Options; | ||||||
| global using Services.Common; | global using Services.Common; | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,26 +1,16 @@ | |||||||
| global using System; | global using System.ComponentModel.DataAnnotations; | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using System.ComponentModel.DataAnnotations; |  | ||||||
| global using System.Data.Common; | global using System.Data.Common; | ||||||
| global using System.Linq; | global using System.Linq; | ||||||
| global using System.Net; |  | ||||||
| global using System.Net.Http; | global using System.Net.Http; | ||||||
| global using System.Text; | global using System.Text; | ||||||
| global using System.Text.Json; | global using System.Text.Json; | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using Microsoft.AspNetCore.Authorization; | global using Microsoft.AspNetCore.Authorization; | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.AspNetCore.Hosting; |  | ||||||
| global using Microsoft.AspNetCore.Http; |  | ||||||
| global using Microsoft.AspNetCore.Mvc; | global using Microsoft.AspNetCore.Mvc; | ||||||
| global using Microsoft.EntityFrameworkCore; | global using Microsoft.EntityFrameworkCore; | ||||||
| global using Microsoft.EntityFrameworkCore.Design; | global using Microsoft.EntityFrameworkCore.Design; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | global using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; | ||||||
| global using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services; | global using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services; | ||||||
| global using Microsoft.Extensions.Configuration; |  | ||||||
| global using Microsoft.Extensions.DependencyInjection; |  | ||||||
| global using Microsoft.Extensions.Logging; |  | ||||||
| global using Services.Common; | global using Services.Common; | ||||||
| global using Webhooks.API.Infrastructure; | global using Webhooks.API.Infrastructure; | ||||||
| global using Webhooks.API.IntegrationEvents; | global using Webhooks.API.IntegrationEvents; | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> |     <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,14 +1,14 @@ | |||||||
| global using System; | global using System; | ||||||
| global using System.Net.Http; |  | ||||||
| global using Microsoft.AspNetCore.Http; |  | ||||||
| global using System.Security.Claims; |  | ||||||
| global using System.Threading.Tasks; |  | ||||||
| global using Microsoft.eShopOnContainers.Services.Basket.API.Model; |  | ||||||
| global using Microsoft.eShopOnContainers.WebMVC.ViewModels; |  | ||||||
| global using System.Text.Json; |  | ||||||
| global using System.Collections.Generic; | global using System.Collections.Generic; | ||||||
| global using System.Linq; | global using System.Linq; | ||||||
|  | global using System.Net.Http; | ||||||
|  | global using System.Security.Claims; | ||||||
| global using System.Text; | global using System.Text; | ||||||
|  | global using System.Text.Json; | ||||||
|  | global using System.Threading.Tasks; | ||||||
|  | global using Microsoft.AspNetCore.Http; | ||||||
|  | global using Microsoft.eShopOnContainers.Services.Basket.API.Model; | ||||||
|  | global using Microsoft.eShopOnContainers.WebMVC.ViewModels; | ||||||
| global using WebMVC.Services.ModelDTOs; | global using WebMVC.Services.ModelDTOs; | ||||||
| global using Xunit; | global using Xunit; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ | |||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <UserSecretsId>aspnet-Microsoft.eShopOnContainers-946ae052-8305-4a99-965b-ec8636ddbae3</UserSecretsId> |     <UserSecretsId>aspnet-Microsoft.eShopOnContainers-946ae052-8305-4a99-965b-ec8636ddbae3</UserSecretsId> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|     <TypeScriptToolsVersion>3.0</TypeScriptToolsVersion> |     <TypeScriptToolsVersion>3.0</TypeScriptToolsVersion> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  | |||||||
| @ -1,13 +1,5 @@ | |||||||
| global using Microsoft.AspNetCore.Mvc; | global using Azure.Core; | ||||||
| global using Microsoft.Extensions.Configuration; |  | ||||||
| global using System.Linq; |  | ||||||
| global using Microsoft.AspNetCore.Hosting; |  | ||||||
| global using System; |  | ||||||
| global using System.Collections.Generic; |  | ||||||
| global using Azure.Identity; | global using Azure.Identity; | ||||||
| global using Azure.Core; |  | ||||||
| global using Microsoft.AspNetCore.Builder; |  | ||||||
| global using Microsoft.AspNetCore.Diagnostics.HealthChecks; | global using Microsoft.AspNetCore.Diagnostics.HealthChecks; | ||||||
| global using Microsoft.Extensions.DependencyInjection; | global using Microsoft.AspNetCore.Mvc; | ||||||
| global using Microsoft.Extensions.Diagnostics.HealthChecks; | global using Microsoft.Extensions.Diagnostics.HealthChecks; | ||||||
| global using Microsoft.Extensions.Hosting; |  | ||||||
|  | |||||||
| @ -1,9 +1,9 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk.Web"> | <Project Sdk="Microsoft.NET.Sdk.Web"> | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|  |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> |     <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> | ||||||
|     <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> |     <DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath> | ||||||
|     <IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>     |  | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  | |||||||
| @ -2,12 +2,9 @@ | |||||||
| 
 | 
 | ||||||
|   <PropertyGroup> |   <PropertyGroup> | ||||||
|     <TargetFramework>net7.0</TargetFramework> |     <TargetFramework>net7.0</TargetFramework> | ||||||
|     <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> |     <ImplicitUsings>enable</ImplicitUsings> | ||||||
|     <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> |     <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> | ||||||
|     <UserSecretsId>36215d41-f31a-4aa6-9929-bd67d650e7b5</UserSecretsId> |     <UserSecretsId>36215d41-f31a-4aa6-9929-bd67d650e7b5</UserSecretsId> | ||||||
|     <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> |  | ||||||
|     <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks> |  | ||||||
|     <IsTransformWebConfigDisabled>true</IsTransformWebConfigDisabled>     |  | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
| 
 | 
 | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user