Browse Source

Merge branch 'dev' into ExtensibleDtos

pull/96/head
Raymond Sun 6 years ago
committed by GitHub
parent
commit
a8fad05466
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      .dockerignore
  2. 5
      azure-pipelines.yml
  3. 2
      common.props
  4. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs
  5. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
  6. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
  7. 1
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs
  8. 4
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs
  9. 1
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs
  10. 3
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs
  11. 3
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductSkuEto.cs
  12. 13
      modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs
  13. 9
      samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs
  14. 4239
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.Designer.cs
  15. 22
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.cs
  16. 4
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs
  17. 78
      samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile
  18. 3
      samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj
  19. 7
      samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json

25
.dockerignore

@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md

5
azure-pipelines.yml

@ -12,8 +12,9 @@ schedules:
always: true
trigger:
- master
branches:
include:
- master
pool:
vmImage: 'ubuntu-latest'

2
common.props

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.12.0</Version>
<Version>0.14.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>EasyAbp Team</Authors>

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs

@ -44,7 +44,7 @@ namespace EasyAbp.EShop.Orders.Orders
foreach (var orderLine in input.OrderLines)
{
orderLines.Add(await GenerateNewOrderLineAsync(orderLine, productDict));
orderLines.Add(await GenerateOrderLineAsync(orderLine, productDict, orderExtraProperties));
}
var productTotalPrice = orderLines.Select(x => x.TotalPrice).Sum();
@ -77,7 +77,7 @@ namespace EasyAbp.EShop.Orders.Orders
return order;
}
protected virtual async Task<OrderLine> GenerateNewOrderLineAsync(CreateOrderLineDto input, Dictionary<Guid, ProductDto> productDict)
protected virtual async Task<OrderLine> GenerateOrderLineAsync(CreateOrderLineDto input, Dictionary<Guid, ProductDto> productDict, Dictionary<string, object> orderExtraProperties)
{
var product = productDict[input.ProductId];
var productSku = product.GetSkuById(input.ProductSkuId);

4
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs

@ -13,7 +13,9 @@ namespace EasyAbp.EShop.Orders.Orders
DateTime ProductDetailModificationTime { get; }
string ProductGroupName { get; }
string ProductGroupDisplayName { get; }
string ProductUniqueName { get; }
string ProductDisplayName { get; }

2
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs

@ -17,6 +17,8 @@ namespace EasyAbp.EShop.Orders.Orders
public string ProductGroupName { get; set; }
public string ProductGroupDisplayName { get; set; }
public string ProductUniqueName { get; set; }
public string ProductDisplayName { get; set; }

1
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Payments/PaymentItem.cs

@ -41,6 +41,7 @@ namespace EasyAbp.EShop.Payments.Payments
private PaymentItem()
{
ExtraProperties = new Dictionary<string, object>();
this.SetDefaultsForExtraProperties();
}
}
}

4
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp/EShop/Payments/Refunds/RefundItem.cs

@ -31,8 +31,10 @@ namespace EasyAbp.EShop.Payments.Refunds
protected RefundItem()
{
ExtraProperties = new Dictionary<string, object>();
RefundItemOrderLines = new List<RefundItemOrderLine>();
ExtraProperties = new Dictionary<string, object>();
this.SetDefaultsForExtraProperties();
}
public void SetStoreId(Guid storeId)

1
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp/EShop/Products/Products/Dtos/ProductSkuDto.cs

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Data;
namespace EasyAbp.EShop.Products.Products.Dtos
{

3
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/IProductSku.cs

@ -1,8 +1,9 @@
using System;
using Volo.Abp.Data;
namespace EasyAbp.EShop.Products.Products
{
public interface IProductSku
public interface IProductSku : IHasExtraProperties
{
string SerializedAttributeOptionIds { get; }

3
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp/EShop/Products/Products/ProductSkuEto.cs

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
namespace EasyAbp.EShop.Products.Products
{
@ -23,5 +24,7 @@ namespace EasyAbp.EShop.Products.Products
public string MediaResources { get; set; }
public Guid? ProductDetailId { get; set; }
public Dictionary<string, object> ExtraProperties { get; set; }
}
}

13
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp/EShop/Products/Products/ProductSku.cs

@ -31,9 +31,15 @@ namespace EasyAbp.EShop.Products.Products
public virtual Dictionary<string, object> ExtraProperties { get; protected set; }
public Guid? ProductDetailId { get; set; }
public virtual Guid? ProductDetailId { get; protected set; }
public virtual Dictionary<string, object> ExtraProperties { get; protected set; }
protected ProductSku() {}
protected ProductSku()
{
ExtraProperties = new Dictionary<string, object>();
this.SetDefaultsForExtraProperties();
}
public ProductSku(
Guid id,
@ -56,6 +62,9 @@ namespace EasyAbp.EShop.Products.Products
OrderMaxQuantity = orderMaxQuantity;
MediaResources = mediaResources;
ProductDetailId = productDetailId;
ExtraProperties = new Dictionary<string, object>();
this.SetDefaultsForExtraProperties();
}
public void TrimCode()

9
samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs

@ -10,6 +10,13 @@ namespace EShopSample.DbMigrator
{
public class DbMigratorHostedService : IHostedService
{
private readonly IHostApplicationLifetime _hostApplicationLifetime;
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime)
{
_hostApplicationLifetime = hostApplicationLifetime;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = AbpApplicationFactory.Create<EShopSampleDbMigratorModule>(options =>
@ -26,6 +33,8 @@ namespace EShopSample.DbMigrator
.MigrateAsync();
application.Shutdown();
_hostApplicationLifetime.StopApplication();
}
}

4239
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.Designer.cs

File diff suppressed because it is too large

22
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200902095440_AddedExtraPropertiesToProductSku.cs

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EShopSample.Migrations
{
public partial class AddedExtraPropertiesToProductSku : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ExtraProperties",
table: "EasyAbpEShopProductsProductSkus",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ExtraProperties",
table: "EasyAbpEShopProductsProductSkus");
}
}
}

4
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs

@ -1338,6 +1338,10 @@ namespace EShopSample.Migrations
.HasColumnName("DeletionTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")

78
samples/EShopSample/aspnet-core/src/EShopSample.Web/Dockerfile

@ -0,0 +1,78 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Web/"]
COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/EasyAbp.EShop.Web.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Web/"]
COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/EasyAbp.EShop.Payments.Web.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Web/"]
COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/EasyAbp.EShop.Stores.Application.Contracts.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application.Contracts/"]
COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/EasyAbp.EShop.Stores.Domain.Shared.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain.Shared/"]
COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/EasyAbp.EShop.Payments.HttpApi.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.HttpApi/"]
COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/EasyAbp.EShop.Payments.Application.Contracts.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application.Contracts/"]
COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/EasyAbp.EShop.Payments.Domain.Shared.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain.Shared/"]
COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/EasyAbp.EShop.Plugins.Web.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Web/"]
COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/EasyAbp.EShop.Plugins.HttpApi.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.HttpApi/"]
COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/EasyAbp.EShop.Plugins.Application.Contracts.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application.Contracts/"]
COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/EasyAbp.EShop.Plugins.Domain.Shared.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain.Shared/"]
COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/EasyAbp.EShop.HttpApi.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.HttpApi/"]
COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/EasyAbp.EShop.Application.Contracts.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Application.Contracts/"]
COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/EasyAbp.EShop.Products.Application.Contracts.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application.Contracts/"]
COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/EasyAbp.EShop.Products.Domain.Shared.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/"]
COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp.EShop.Orders.Application.Contracts.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/"]
COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp.EShop.Orders.Domain.Shared.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/"]
COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/EasyAbp.EShop.Domain.Shared.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain.Shared/"]
COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/EasyAbp.EShop.Stores.HttpApi.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.HttpApi/"]
COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/EasyAbp.EShop.Orders.HttpApi.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.HttpApi/"]
COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/EasyAbp.EShop.Products.HttpApi.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.HttpApi/"]
COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/EasyAbp.EShop.Orders.Web.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Web/"]
COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/EasyAbp.EShop.Stores.Web.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Web/"]
COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/EasyAbp.EShop.Products.Web.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Web/"]
COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Application/EShopSample.Application.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Application/"]
COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/EasyAbp.EShop.Application.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Application/"]
COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/EasyAbp.EShop.Domain.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.Domain/"]
COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/EasyAbp.EShop.Plugins.Domain.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Domain/"]
COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/"]
COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/EasyAbp.EShop.Products.Domain.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain/"]
COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/EasyAbp.EShop.Payments.Domain.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Domain/"]
COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp.EShop.Stores.Domain.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/"]
COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/EasyAbp.EShop.Stores.Application.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Application/"]
COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/EasyAbp.EShop.Products.Application.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Application/"]
COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/EasyAbp.EShop.Plugins.Application.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.Application/"]
COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp.EShop.Payments.Application.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/"]
COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp.EShop.Orders.Application.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/"]
COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Domain/EShopSample.Domain.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Domain/"]
COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/EasyAbp.EShop.Plugins.Baskets.Domain.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain/"]
COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/EasyAbp.EShop.Plugins.Baskets.Domain.Shared.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Domain.Shared/"]
COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/EShopSample.Domain.Shared.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Domain.Shared/"]
COPY ["samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/EShopSample.Application.Contracts.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.Application.Contracts/"]
COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/EasyAbp.EShop.Plugins.Baskets.Application.Contracts.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application.Contracts/"]
COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/EasyAbp.EShop.Plugins.Baskets.Application.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Application/"]
COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/EasyAbp.EShop.Plugins.Baskets.Web.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.Web/"]
COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/EasyAbp.EShop.Plugins.Baskets.HttpApi.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.HttpApi/"]
COPY ["samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/EShopSample.EntityFrameworkCore.DbMigrations.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/"]
COPY ["samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/EShopSample.EntityFrameworkCore.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore/"]
COPY ["integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/EasyAbp.EShop.EntityFrameworkCore.csproj", "integration/EasyAbp.EShop/src/EasyAbp.EShop.EntityFrameworkCore/"]
COPY ["modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/EasyAbp.EShop.Stores.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.EntityFrameworkCore/"]
COPY ["modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/EasyAbp.EShop.Products.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.EntityFrameworkCore/"]
COPY ["modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp.EShop.Orders.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/"]
COPY ["modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp.EShop.Payments.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/"]
COPY ["modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/EasyAbp.EShop.Plugins.EntityFrameworkCore.csproj", "modules/EasyAbp.EShop.Plugins/src/EasyAbp.EShop.Plugins.EntityFrameworkCore/"]
COPY ["plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore.csproj", "plugins/Baskets/src/EasyAbp.EShop.Plugins.Baskets.EntityFrameworkCore/"]
COPY ["samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/EShopSample.HttpApi.csproj", "samples/EShopSample/aspnet-core/src/EShopSample.HttpApi/"]
RUN dotnet restore "samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj"
COPY . .
WORKDIR "/src/samples/EShopSample/aspnet-core/src/EShopSample.Web"
RUN dotnet build "EShopSample.Web.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "EShopSample.Web.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "EShopSample.Web.dll"]

3
samples/EShopSample/aspnet-core/src/EShopSample.Web/EShopSample.Web.csproj

@ -13,6 +13,8 @@
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>EShopSample-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..\..\..</DockerfileContext>
</PropertyGroup>
<ItemGroup>
@ -32,6 +34,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />

7
samples/EShopSample/aspnet-core/src/EShopSample.Web/Properties/launchSettings.json

@ -22,6 +22,13 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:44340/"
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true,
"useSSL": true
}
}
}
Loading…
Cancel
Save