Browse Source

Merge branch 'dev' of https://github.com/abpframework/abp into dev

pull/1955/head
mehmet-erim 7 years ago
parent
commit
a4c3b9cfc3
  1. 2
      docs/en/Getting-Started-Angular-Template.md
  2. 1
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj
  3. 33
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs
  4. 14
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProvider.cs
  5. 5
      framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs
  6. 5
      framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs
  7. 5
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AspNetCoreMvcTestBase.cs
  8. 3
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs
  9. 3
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonSerializer_Tests.cs
  10. 9
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs
  11. 5
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs
  12. 9
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs
  13. 22
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs
  14. 7
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs
  15. 2
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj
  16. 10
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs
  17. 10
      framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs
  18. 9
      framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs
  19. 10
      framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs
  20. 15
      modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs
  21. 20
      modules/blogging/app/Volo.BloggingTestApp/Program.cs
  22. 12
      modules/blogging/app/Volo.BloggingTestApp/Startup.cs
  23. 4
      modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj
  24. 20
      modules/client-simulation/demo/Volo.ClientSimulation.Demo/Program.cs
  25. 9
      modules/client-simulation/demo/Volo.ClientSimulation.Demo/Startup.cs
  26. 2
      modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj
  27. 7
      modules/docs/app/VoloDocs.Web/Branding/VoloDocsBrandingProvider.cs
  28. 20
      modules/docs/app/VoloDocs.Web/Program.cs
  29. 11
      modules/docs/app/VoloDocs.Web/Startup.cs
  30. 4
      modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj
  31. 3
      modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs
  32. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs
  33. 51
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs
  34. 3
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs
  35. 4
      samples/BasicAspNetCoreApplication/BasicAspNetCoreApplication/BasicAspNetCoreApplication.csproj
  36. 2
      samples/BasicAspNetCoreApplication/BasicAspNetCoreApplication/Program.cs
  37. 9
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
  38. 6
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Acme.BookStore.HttpApi.Host.csproj
  39. 9
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/BookStoreHttpApiHostModule.cs
  40. 4
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Controllers/HomeController.cs
  41. 20
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Program.cs
  42. 9
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Startup.cs
  43. 10
      samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj
  44. 10
      samples/BookStore-Modular/application/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj
  45. 2
      samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj
  46. 16
      samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj
  47. 18
      samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj
  48. 9
      samples/BookStore-Modular/application/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
  49. 18
      samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore/Acme.BookStore.EntityFrameworkCore.csproj
  50. 10
      samples/BookStore-Modular/application/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj
  51. 10
      samples/BookStore-Modular/application/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj
  52. 20
      samples/BookStore-Modular/application/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj
  53. 9
      samples/BookStore-Modular/application/src/Acme.BookStore.Web/BookStoreWebModule.cs
  54. 20
      samples/BookStore-Modular/application/src/Acme.BookStore.Web/Program.cs
  55. 9
      samples/BookStore-Modular/application/src/Acme.BookStore.Web/Startup.cs
  56. 2
      samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj
  57. 6
      samples/BookStore-Modular/application/test/Acme.BookStore.TestBase/Acme.BookStore.TestBase.csproj
  58. 2
      samples/BookStore-Modular/application/test/Acme.BookStore.Web.Tests/Acme.BookStore.Web.Tests.csproj
  59. 5
      samples/BookStore-Modular/application/test/Acme.BookStore.Web.Tests/BookStoreWebTestBase.cs
  60. 9
      samples/BookStore-Modular/application/test/Acme.BookStore.Web.Tests/BookStoreWebTestStartup.cs
  61. 18
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Acme.BookStore.BookManagement.HttpApi.Host.csproj
  62. 18
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/BookManagementHttpApiHostModule.cs
  63. 5
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Controllers/HomeController.cs
  64. 20
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Program.cs
  65. 11
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Startup.cs
  66. 46
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Acme.BookStore.BookManagement.IdentityServer.csproj
  67. 16
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/BookManagementIdentityServerModule.cs
  68. 9
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs
  69. 20
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Program.cs
  70. 11
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Startup.cs
  71. 26
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj
  72. 14
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/BookManagementWebHostModule.cs
  73. 20
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Program.cs
  74. 9
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Startup.cs
  75. 36
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Acme.BookStore.BookManagement.Web.Unified.csproj
  76. 16
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/BookManagementWebUnifiedModule.cs
  77. 20
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Program.cs
  78. 11
      samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Startup.cs
  79. 4
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application.Contracts/Acme.BookStore.BookManagement.Application.Contracts.csproj
  80. 4
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application/Acme.BookStore.BookManagement.Application.csproj
  81. 4
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain.Shared/Acme.BookStore.BookManagement.Domain.Shared.csproj
  82. 4
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain/Acme.BookStore.BookManagement.Domain.csproj
  83. 4
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.EntityFrameworkCore/Acme.BookStore.BookManagement.EntityFrameworkCore.csproj
  84. 4
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi.Client/Acme.BookStore.BookManagement.HttpApi.Client.csproj
  85. 4
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/Acme.BookStore.BookManagement.HttpApi.csproj
  86. 4
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/Acme.BookStore.BookManagement.MongoDB.csproj
  87. 6
      samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Web/Acme.BookStore.BookManagement.Web.csproj
  88. 4
      samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj
  89. 37
      samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs
  90. 9
      samples/BookStore/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj
  91. 9
      samples/BookStore/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj
  92. 2
      samples/BookStore/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj
  93. 16
      samples/BookStore/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj
  94. 18
      samples/BookStore/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj
  95. 5
      samples/BookStore/src/Acme.BookStore.Domain/Book.cs
  96. 9
      samples/BookStore/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
  97. 18
      samples/BookStore/src/Acme.BookStore.EntityFrameworkCore/Acme.BookStore.EntityFrameworkCore.csproj
  98. 9
      samples/BookStore/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj
  99. 9
      samples/BookStore/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj
  100. 18
      samples/BookStore/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj

2
docs/en/Getting-Started-Angular-Template.md

@ -75,7 +75,7 @@ Hit F5 (or Ctrl+F5) to run the application. It will have an output like shown be
#### Using EF Core Update-Database Command
Ef Core has `Update-Database` command which creates database if necessary and applies pending migrations. Right click to the `.Web` project and select **Set as StartUp Project**:
Ef Core has `Update-Database` command which creates database if necessary and applies pending migrations. Right click to the `.HttpApi.Host` project and select **Set as StartUp Project**:
![set-as-startup-project](images/set-as-startup-project.png)

1
framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj

@ -19,6 +19,7 @@
<ProjectReference Include="..\Volo.Abp.AspNetCore\Volo.Abp.AspNetCore.csproj" />
<ProjectReference Include="..\Volo.Abp.Http.Client\Volo.Abp.Http.Client.csproj" />
<ProjectReference Include="..\Volo.Abp.TestBase\Volo.Abp.TestBase.csproj" />
<ProjectReference Include="..\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
</ItemGroup>
<ItemGroup>

33
framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs

@ -3,9 +3,11 @@ using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Volo.Abp.AspNetCore.TestBase
{
@ -20,31 +22,36 @@ namespace Volo.Abp.AspNetCore.TestBase
protected AbpAspNetCoreIntegratedTestBase()
{
var builder = CreateWebHostBuilder();
Server = CreateTestServer(builder);
Client = Server.CreateClient();
ServiceProvider = Server.Host.Services;
var builder = CreateHostBuilder();
var host = builder.Build();
host.Start();
Server = host.GetTestServer();
Client = host.GetTestClient();
ServiceProvider = Server.Services;
ServiceProvider.GetRequiredService<ITestServerAccessor>().Server = Server;
}
protected virtual IWebHostBuilder CreateWebHostBuilder()
protected virtual IHostBuilder CreateHostBuilder()
{
return new WebHostBuilder()
.UseStartup<TStartup>()
return Host.CreateDefaultBuilder()
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<TStartup>();
webBuilder.UseTestServer();
})
.UseAutofac()
.ConfigureServices(ConfigureServices);
}
protected virtual void ConfigureServices(WebHostBuilderContext context, IServiceCollection services)
protected virtual void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{
}
protected virtual TestServer CreateTestServer(IWebHostBuilder builder)
{
return new TestServer(builder);
}
#region GetUrl
/// <summary>

14
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/EfCoreDatabaseProvider.cs

@ -0,0 +1,14 @@
namespace Volo.Abp.EntityFrameworkCore
{
public enum EfCoreDatabaseProvider
{
SqlServer,
MySql,
Oracle,
PostgreSql,
Sqlite,
InMemory,
Cosmos,
Firebird
}
}

5
framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_WithDomainResolver_Tests.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Shouldly;
using Volo.Abp.MultiTenancy;
@ -23,9 +24,9 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
_options = ServiceProvider.GetRequiredService<IOptions<AspNetCoreMultiTenancyOptions>>().Value;
}
protected override IWebHostBuilder CreateWebHostBuilder()
protected override IHostBuilder CreateHostBuilder()
{
return base.CreateWebHostBuilder().ConfigureServices(services =>
return base.CreateHostBuilder().ConfigureServices(services =>
{
services.Configure<DefaultTenantStoreOptions>(options =>
{

5
framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_Without_DomainResolver_Tests.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Microsoft.Net.Http.Headers;
using Shouldly;
@ -24,9 +25,9 @@ namespace Volo.Abp.AspNetCore.MultiTenancy
_options = ServiceProvider.GetRequiredService<IOptions<AspNetCoreMultiTenancyOptions>>().Value;
}
protected override IWebHostBuilder CreateWebHostBuilder()
protected override IHostBuilder CreateHostBuilder()
{
return base.CreateWebHostBuilder().ConfigureServices(services =>
return base.CreateHostBuilder().ConfigureServices(services =>
{
services.Configure<DefaultTenantStoreOptions>(options =>
{

5
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AspNetCoreMvcTestBase.cs

@ -1,12 +1,13 @@
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace Volo.Abp.AspNetCore.Mvc
{
public abstract class AspNetCoreMvcTestBase : AbpAspNetCoreTestBase<Startup>
{
protected override IWebHostBuilder CreateWebHostBuilder()
protected override IHostBuilder CreateHostBuilder()
{
var contentRootPath = CalculateContentRootPath(
"Volo.Abp.AspNetCore.Mvc.Tests.csproj",
@ -16,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc
)
);
return base.CreateWebHostBuilder()
return base.CreateHostBuilder()
.UseContentRoot(contentRootPath);
}

3
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonResultController_Tests.cs

@ -1,6 +1,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Shouldly;
using Volo.Abp.Json;
using Xunit;
@ -9,7 +10,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Json
{
public class JsonResultController_Tests : AspNetCoreMvcTestBase
{
protected override void ConfigureServices(WebHostBuilderContext context, IServiceCollection services)
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{
services.Configure<AbpJsonOptions>(options =>
{

3
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Json/JsonSerializer_Tests.cs

@ -1,6 +1,7 @@
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Shouldly;
using Volo.Abp.Json;
using Xunit;
@ -16,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Json
_jsonSerializer = ServiceProvider.GetRequiredService<IJsonSerializer>();
}
protected override void ConfigureServices(WebHostBuilderContext context, IServiceCollection services)
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{
services.Configure<AbpJsonOptions>(options =>
{

9
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs

@ -8,14 +8,9 @@ namespace Volo.Abp.AspNetCore.Mvc
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<AbpAspNetCoreMvcTestModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<AbpAspNetCoreMvcTestModule>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)

5
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/AbpAspNetCoreMvcUiBootstrapDemoTestBase.cs

@ -2,14 +2,15 @@
using System.IO;
using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
{
public abstract class AbpAspNetCoreMvcUiBootstrapDemoTestBase : AbpAspNetCoreTestBase<TestStartup>
{
protected override IWebHostBuilder CreateWebHostBuilder()
protected override IHostBuilder CreateHostBuilder()
{
return base.CreateWebHostBuilder()
return base.CreateHostBuilder()
.UseContentRoot(CalculateContentRootPath());
}

9
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs

@ -8,14 +8,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
{
public class TestStartup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<AbpAspNetCoreMvcUiBootstrapDemoTestModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<AbpAspNetCoreMvcUiBootstrapDemoTestModule>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)

22
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs

@ -21,7 +21,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Build().Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -35,20 +35,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
}
}
//internal static IWebHost BuildWebHostInternal(string[] args) =>
// new WebHostBuilder()
// .UseKestrel()
// .UseContentRoot(Directory.GetCurrentDirectory())
// .UseIISIntegration()
// .UseStartup<Startup>()
// .UseSerilog()
// .Build();
internal static IHostBuilder BuildWebHostInternal(string[] args) =>
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

7
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs

@ -9,12 +9,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
{
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<AbpAspNetCoreMvcUiBootstrapDemoModule>(options =>
{
options.UseAutofac();
});
//return services.BuildServiceProviderFromFactory();
services.AddApplication<AbpAspNetCoreMvcUiBootstrapDemoModule>();
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)

2
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj

@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
</ItemGroup>

10
framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs

@ -8,15 +8,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<AbpAspNetCoreMvcUiTestModule>(options =>
{
options.UseAutofac();
});
//TODO: This is needed because ASP.NET Core does not use IServiceProviderFactory!
return services.BuildServiceProviderFromFactory();
services.AddApplication<AbpAspNetCoreMvcUiTestModule>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)

10
framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs

@ -8,15 +8,9 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<AbpAspNetCoreMvcVersioningTestModule>(options =>
{
options.UseAutofac();
});
//TODO: This is needed because ASP.NET Core does not use IServiceProviderFactory!
return services.BuildServiceProviderFromFactory();
services.AddApplication<AbpAspNetCoreMvcVersioningTestModule>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)

9
framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs

@ -8,14 +8,9 @@ namespace Volo.Abp.AspNetCore
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<AbpAspNetCoreTestModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<AbpAspNetCoreTestModule>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)

10
framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs

@ -6,15 +6,9 @@ namespace Volo.Abp.Http
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<AbpHttpClientTestModule>(options =>
{
options.UseAutofac();
});
//TODO: This is needed because ASP.NET Core does not use IServiceProviderFactory!
return services.BuildServiceProviderFromFactory();
services.AddApplication<AbpHttpClientTestModule>();
}
public void Configure(IApplicationBuilder app)

15
modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs

@ -11,6 +11,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
@ -59,7 +60,7 @@ namespace Volo.BloggingTestApp
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.BuildConfiguration();
var configuration = context.Services.GetConfiguration();
Configure<BloggingUrlOptions>(options =>
{
@ -99,7 +100,7 @@ namespace Volo.BloggingTestApp
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info { Title = "Blogging API", Version = "v1" });
options.SwaggerDoc("v1", new OpenApiInfo { Title = "Blogging API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
@ -147,11 +148,11 @@ namespace Volo.BloggingTestApp
app.UseRouting();
//app.UseSwagger();
//app.UseSwaggerUI(options =>
//{
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
//});
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
});
app.UseAuthentication();

20
modules/blogging/app/Volo.BloggingTestApp/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -20,7 +21,7 @@ namespace Volo.BloggingTestApp
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -34,14 +35,13 @@ namespace Volo.BloggingTestApp
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

12
modules/blogging/app/Volo.BloggingTestApp/Startup.cs

@ -9,19 +9,13 @@ namespace Volo.BloggingTestApp
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<BloggingTestAppModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<BloggingTestAppModule>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
}

4
modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj

@ -12,9 +12,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
</ItemGroup>
<ItemGroup>

20
modules/client-simulation/demo/Volo.ClientSimulation.Demo/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -20,7 +21,7 @@ namespace Volo.ClientSimulation.Demo
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -34,14 +35,13 @@ namespace Volo.ClientSimulation.Demo
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

9
modules/client-simulation/demo/Volo.ClientSimulation.Demo/Startup.cs

@ -7,14 +7,9 @@ namespace Volo.ClientSimulation.Demo
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<ClientSimulationDemoModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<ClientSimulationDemoModule>();
}
public void Configure(IApplicationBuilder app)

2
modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
</ItemGroup>

7
modules/docs/app/VoloDocs.Web/Branding/VoloDocsBrandingProvider.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components;
using Volo.Abp.Configuration;
using Volo.Abp.DependencyInjection;
@ -9,10 +10,8 @@ namespace VoloDocs.Web.Branding
[Dependency(ReplaceServices = true)]
public class VoloDocsBrandingProvider : DefaultBrandingProvider
{
public VoloDocsBrandingProvider(IConfigurationAccessor configurationAccessor, IStringLocalizer<DocsResource> localizer)
public VoloDocsBrandingProvider(IConfiguration configuration, IStringLocalizer<DocsResource> localizer)
{
var configuration = configurationAccessor.Configuration;
AppName = localizer["DocsTitle"];
if (configuration["LogoUrl"] != null)

20
modules/docs/app/VoloDocs.Web/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -20,7 +21,7 @@ namespace VoloDocs.Web
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -34,14 +35,13 @@ namespace VoloDocs.Web
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

11
modules/docs/app/VoloDocs.Web/Startup.cs

@ -9,17 +9,12 @@ namespace VoloDocs.Web
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<VoloDocsWebModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<VoloDocsWebModule>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}

4
modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj

@ -14,9 +14,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
</ItemGroup>
<ItemGroup>

3
modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs

@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
@ -96,7 +97,7 @@ namespace VoloDocs.Web
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info
options.SwaggerDoc("v1", new OpenApiInfo
{
Title = "Docs API",
Version = "v1"

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs

@ -9,6 +9,6 @@
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
// apparently anything over 4K converts to nvarchar(max) on SqlServer
public const int DataMaxLength = 5000;
public const int DataMaxLength = 50000;
}
}

51
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs

@ -2,6 +2,7 @@
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.IdentityServer.ApiResources;
using Volo.Abp.IdentityServer.Clients;
@ -71,7 +72,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
redirectUri.HasKey(x => new { x.ClientId, x.RedirectUri });
redirectUri.Property(x => x.RedirectUri).HasMaxLength(ClientRedirectUriConsts.RedirectUriMaxLength).IsRequired();
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
{
redirectUri.Property(x => x.RedirectUri).HasMaxLength(300).IsRequired();
}
else
{
redirectUri.Property(x => x.RedirectUri).HasMaxLength(ClientRedirectUriConsts.RedirectUriMaxLength).IsRequired();
}
});
builder.Entity<ClientPostLogoutRedirectUri>(postLogoutRedirectUri =>
@ -80,7 +88,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
postLogoutRedirectUri.HasKey(x => new { x.ClientId, x.PostLogoutRedirectUri });
postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLength).IsRequired();
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
{
postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(300).IsRequired();
}
else
{
postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLength).IsRequired();
}
});
builder.Entity<ClientScope>(scope =>
@ -99,7 +114,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
secret.HasKey(x => new { x.ClientId, x.Type, x.Value });
secret.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired();
secret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
{
secret.Property(x => x.Value).HasMaxLength(300).IsRequired();
}
else
{
secret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
}
secret.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength);
});
@ -152,7 +176,15 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
grant.Property(x => x.SubjectId).HasMaxLength(PersistedGrantConsts.SubjectIdMaxLength);
grant.Property(x => x.ClientId).HasMaxLength(PersistedGrantConsts.ClientIdMaxLength).IsRequired();
grant.Property(x => x.CreationTime).IsRequired();
grant.Property(x => x.Data).HasMaxLength(PersistedGrantConsts.DataMaxLength).IsRequired();
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
{
grant.Property(x => x.Data).HasMaxLength(10000).IsRequired();
}
else
{
grant.Property(x => x.Data).HasMaxLength(PersistedGrantConsts.DataMaxLength).IsRequired();
}
grant.HasKey(x => x.Key); //TODO: What about Id!!!
@ -214,7 +246,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
apiSecret.HasKey(x => new { x.ApiResourceId, x.Type, x.Value });
apiSecret.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired();
apiSecret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
{
apiSecret.Property(x => x.Value).HasMaxLength(300).IsRequired();
}
else
{
apiSecret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
}
apiSecret.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength);
});

3
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerModelBuilderConfigurationOptions.cs

@ -1,10 +1,13 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace Volo.Abp.IdentityServer.EntityFrameworkCore
{
public class IdentityServerModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions
{
public EfCoreDatabaseProvider? DatabaseProvider { get; set; }
public IdentityServerModelBuilderConfigurationOptions(
[NotNull] string tablePrefix,
[CanBeNull] string schema)

4
samples/BasicAspNetCoreApplication/BasicAspNetCoreApplication/BasicAspNetCoreApplication.csproj

@ -5,8 +5,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="0.22.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.22.0" />
<ProjectReference Include="..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc\Volo.Abp.AspNetCore.Mvc.csproj" />
</ItemGroup>
<ItemGroup>

2
samples/BasicAspNetCoreApplication/BasicAspNetCoreApplication/Program.cs

@ -10,7 +10,7 @@ namespace BasicAspNetCoreApplication
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{

9
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using IdentityServer4.Models;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Configuration;
using Volo.Abp.Data;
@ -24,7 +25,7 @@ namespace Acme.BookStore.IdentityServer
private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
private readonly IGuidGenerator _guidGenerator;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IConfigurationAccessor _configurationAccessor;
private readonly IConfiguration _configuration;
public IdentityServerDataSeedContributor(
IClientRepository clientRepository,
@ -32,14 +33,14 @@ namespace Acme.BookStore.IdentityServer
IIdentityResourceDataSeeder identityResourceDataSeeder,
IGuidGenerator guidGenerator,
IPermissionDataSeeder permissionDataSeeder,
IConfigurationAccessor configurationAccessor)
IConfiguration configuration)
{
_clientRepository = clientRepository;
_apiResourceRepository = apiResourceRepository;
_identityResourceDataSeeder = identityResourceDataSeeder;
_guidGenerator = guidGenerator;
_permissionDataSeeder = permissionDataSeeder;
_configurationAccessor = configurationAccessor;
_configuration = configuration;
}
[UnitOfWork]
@ -104,7 +105,7 @@ namespace Acme.BookStore.IdentityServer
"BookStore"
};
var configurationSection = _configurationAccessor.Configuration.GetSection("IdentityServer:Clients");
var configurationSection = _configuration.GetSection("IdentityServer:Clients");
//Web Client
var webClientId = configurationSection["BookStore_Web:ClientId"];

6
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Acme.BookStore.HttpApi.Host.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
@ -10,10 +10,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.MultiTenancy\Volo.Abp.AspNetCore.MultiTenancy.csproj" />

9
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/BookStoreHttpApiHostModule.cs

@ -11,6 +11,7 @@ using Microsoft.Extensions.Hosting;
using Acme.BookStore.MongoDB;
using Acme.BookStore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
@ -50,9 +51,7 @@ namespace Acme.BookStore
ConfigureLocalization();
ConfigureVirtualFileSystem(context);
ConfigureCors(context, configuration);
//Disabled swagger since it does not support ASP.NET Core 3.0 yet!
//ConfigureSwaggerServices(context);
ConfigureSwaggerServices(context);
}
private void ConfigureUrls(IConfigurationRoot configuration)
@ -107,7 +106,7 @@ namespace Acme.BookStore
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info {Title = "BookStore API", Version = "v1"});
options.SwaggerDoc("v1", new OpenApiInfo {Title = "BookStore API", Version = "v1"});
options.DocInclusionPredicate((docName, description) => true);
});
}
@ -166,13 +165,11 @@ namespace Acme.BookStore
app.UseIdentityServer();
app.UseAbpRequestLocalization();
/* Disabled swagger since it does not support ASP.NET Core 3.0 yet!
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "BookStore API");
});
*/
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();

4
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Controllers/HomeController.cs

@ -7,9 +7,7 @@ namespace Acme.BookStore.Controllers
{
public ActionResult Index()
{
//TODO: Enabled once Swagger supports ASP.NET Core 3.x
//return Redirect("/swagger");
return Content("OK: Acme.BookStore.HttpApi.Host is running...");
return Redirect("/swagger");
}
}
}

20
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -24,7 +25,7 @@ namespace Acme.BookStore
try
{
Log.Information("Starting Acme.BookStore.HttpApi.Host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -38,14 +39,13 @@ namespace Acme.BookStore
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

9
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Startup.cs

@ -9,14 +9,9 @@ namespace Acme.BookStore
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<BookStoreHttpApiHostModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<BookStoreHttpApiHostModule>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)

10
samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj

@ -12,11 +12,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.Application.Contracts\Volo.Abp.Account.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application.Contracts\Volo.Abp.Identity.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application.Contracts\Volo.Abp.PermissionManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application.Contracts\Volo.Abp.TenantManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application.Contracts\Volo.Abp.FeatureManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\modules\book-management\src\Acme.BookStore.BookManagement.Application.Contracts\Acme.BookStore.BookManagement.Application.Contracts.csproj" />
</ItemGroup>

10
samples/BookStore-Modular/application/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj

@ -13,11 +13,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.Application\Volo.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application\Volo.Abp.TenantManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application\Volo.Abp.FeatureManagement.Application.csproj" />
<ProjectReference Include="..\..\..\modules\book-management\src\Acme.BookStore.BookManagement.Application\Acme.BookStore.BookManagement.Application.csproj" />
</ItemGroup>

2
samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj

@ -26,7 +26,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj" />
<ProjectReference Include="..\Acme.BookStore.EntityFrameworkCore.DbMigrations\Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj" />
</ItemGroup>

16
samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj

@ -8,14 +8,14 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain.Shared\Volo.Abp.Identity.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.Domain.Shared\Volo.Abp.IdentityServer.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain.Shared\Volo.Abp.BackgroundJobs.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain.Shared\Volo.Abp.AuditLogging.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain.Shared\Volo.Abp.TenantManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain.Shared\Volo.Abp.FeatureManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Domain.Shared\Volo.Abp.PermissionManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.Domain.Shared\Volo.Abp.SettingManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\modules\book-management\src\Acme.BookStore.BookManagement.Domain.Shared\Acme.BookStore.BookManagement.Domain.Shared.csproj" />
</ItemGroup>

18
samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj

@ -13,15 +13,15 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="0.21.0" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain\Volo.Abp.Identity.Domain.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.Domain\Volo.Abp.IdentityServer.Domain.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identityserver\src\Volo.Abp.PermissionManagement.Domain.IdentityServer\Volo.Abp.PermissionManagement.Domain.IdentityServer.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain\Volo.Abp.BackgroundJobs.Domain.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain\Volo.Abp.AuditLogging.Domain.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain\Volo.Abp.TenantManagement.Domain.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.Domain\Volo.Abp.SettingManagement.Domain.csproj" />
<ProjectReference Include="..\..\..\modules\book-management\src\Acme.BookStore.BookManagement.Domain\Acme.BookStore.BookManagement.Domain.csproj" />
</ItemGroup>

9
samples/BookStore-Modular/application/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using IdentityServer4.Models;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Configuration;
using Volo.Abp.Data;
@ -24,7 +25,7 @@ namespace Acme.BookStore.IdentityServer
private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
private readonly IGuidGenerator _guidGenerator;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IConfigurationAccessor _configurationAccessor;
private readonly IConfiguration _configuration;
public IdentityServerDataSeedContributor(
IClientRepository clientRepository,
@ -32,14 +33,14 @@ namespace Acme.BookStore.IdentityServer
IIdentityResourceDataSeeder identityResourceDataSeeder,
IGuidGenerator guidGenerator,
IPermissionDataSeeder permissionDataSeeder,
IConfigurationAccessor configurationAccessor)
IConfiguration configuration)
{
_clientRepository = clientRepository;
_apiResourceRepository = apiResourceRepository;
_identityResourceDataSeeder = identityResourceDataSeeder;
_guidGenerator = guidGenerator;
_permissionDataSeeder = permissionDataSeeder;
_configurationAccessor = configurationAccessor;
_configuration = configuration;
}
[UnitOfWork]
@ -104,7 +105,7 @@ namespace Acme.BookStore.IdentityServer
"BookStore"
};
var configurationSection = _configurationAccessor.Configuration.GetSection("IdentityServer:Clients");
var configurationSection = _configuration.GetSection("IdentityServer:Clients");
//Web Client
var webClientId = configurationSection["BookStore_Web:ClientId"];

18
samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore/Acme.BookStore.EntityFrameworkCore.csproj

@ -9,15 +9,15 @@
<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.EntityFrameworkCore\Volo.Abp.IdentityServer.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.EntityFrameworkCore\Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.EntityFrameworkCore\Volo.Abp.TenantManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.EntityFrameworkCore\Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\modules\book-management\src\Acme.BookStore.BookManagement.EntityFrameworkCore\Acme.BookStore.BookManagement.EntityFrameworkCore.csproj" />
</ItemGroup>

10
samples/BookStore-Modular/application/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj

@ -13,11 +13,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi.Client" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi.Client\Volo.Abp.Account.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi.Client\Volo.Abp.Identity.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi.Client\Volo.Abp.PermissionManagement.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi.Client\Volo.Abp.TenantManagement.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi.Client\Volo.Abp.FeatureManagement.HttpApi.Client.csproj" />
</ItemGroup>
</Project>

10
samples/BookStore-Modular/application/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj

@ -13,11 +13,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi\Volo.Abp.Account.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi\Volo.Abp.PermissionManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi\Volo.Abp.TenantManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi\Volo.Abp.FeatureManagement.HttpApi.csproj" />
</ItemGroup>
</Project>

20
samples/BookStore-Modular/application/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
@ -32,10 +32,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0" />
</ItemGroup>
@ -45,13 +45,13 @@
<ProjectReference Include="..\Acme.BookStore.Application\Acme.BookStore.Application.csproj" />
<ProjectReference Include="..\Acme.BookStore.HttpApi\Acme.BookStore.HttpApi.csproj" />
<ProjectReference Include="..\Acme.BookStore.EntityFrameworkCore.DbMigrations\Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Web" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Authentication.JwtBearer\Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.Web.IdentityServer\Volo.Abp.Account.Web.IdentityServer.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Web\Volo.Abp.TenantManagement.Web.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Web\Volo.Abp.FeatureManagement.Web.csproj" />
</ItemGroup>
</Project>

9
samples/BookStore-Modular/application/src/Acme.BookStore.Web/BookStoreWebModule.cs

@ -11,6 +11,7 @@ using Acme.BookStore.EntityFrameworkCore;
using Acme.BookStore.Localization;
using Acme.BookStore.MultiTenancy;
using Acme.BookStore.Web.Menus;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
@ -78,9 +79,7 @@ namespace Acme.BookStore.Web
ConfigureLocalizationServices();
ConfigureNavigationServices();
ConfigureAutoApiControllers();
//Disabled swagger since it does not support ASP.NET Core 3.0 yet!
//ConfigureSwaggerServices(context.Services);
ConfigureSwaggerServices(context.Services);
}
private void ConfigureUrls(IConfigurationRoot configuration)
@ -170,7 +169,7 @@ namespace Acme.BookStore.Web
services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info { Title = "BookStore API", Version = "v1" });
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookStore API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
}
@ -207,13 +206,11 @@ namespace Acme.BookStore.Web
app.UseIdentityServer();
app.UseAbpRequestLocalization();
/* Disabled swagger since it does not support ASP.NET Core 3.0 yet!
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "BookStore API");
});
*/
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();

20
samples/BookStore-Modular/application/src/Acme.BookStore.Web/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -24,7 +25,7 @@ namespace Acme.BookStore.Web
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -38,14 +39,13 @@ namespace Acme.BookStore.Web
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

9
samples/BookStore-Modular/application/src/Acme.BookStore.Web/Startup.cs

@ -8,14 +8,9 @@ namespace Acme.BookStore.Web
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<BookStoreWebModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<BookStoreWebModule>();
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)

2
samples/BookStore-Modular/application/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj

@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Http.Client.IdentityModel\Volo.Abp.Http.Client.IdentityModel.csproj" />
<ProjectReference Include="..\..\src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj" />
</ItemGroup>

6
samples/BookStore-Modular/application/test/Acme.BookStore.TestBase/Acme.BookStore.TestBase.csproj

@ -8,9 +8,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TestBase" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Authorization" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.TestBase\Volo.Abp.TestBase.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Authorization\Volo.Abp.Authorization.csproj" />
<ProjectReference Include="..\..\src\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
</ItemGroup>

2
samples/BookStore-Modular/application/test/Acme.BookStore.Web.Tests/Acme.BookStore.Web.Tests.csproj

@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<ProjectReference Include="..\Acme.BookStore.Application.Tests\Acme.BookStore.Application.Tests.csproj" />
<ProjectReference Include="..\..\src\Acme.BookStore.Web\Acme.BookStore.Web.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.TestBase" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.TestBase\Volo.Abp.AspNetCore.TestBase.csproj" />
</ItemGroup>
<ItemGroup>

5
samples/BookStore-Modular/application/test/Acme.BookStore.Web.Tests/BookStoreWebTestBase.cs

@ -2,6 +2,7 @@
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Shouldly;
@ -11,10 +12,10 @@ namespace Acme.BookStore
{
public abstract class BookStoreWebTestBase : AbpAspNetCoreIntegratedTestBase<BookStoreWebTestStartup>
{
protected override IWebHostBuilder CreateWebHostBuilder()
protected override IHostBuilder CreateHostBuilder()
{
return base
.CreateWebHostBuilder()
.CreateHostBuilder()
.UseContentRoot(WebContentDirectoryFinder.CalculateContentRootFolder());
}

9
samples/BookStore-Modular/application/test/Acme.BookStore.Web.Tests/BookStoreWebTestStartup.cs

@ -8,14 +8,9 @@ namespace Acme.BookStore
{
public class BookStoreWebTestStartup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<BookStoreWebTestModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<BookStoreWebTestModule>();
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)

18
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Acme.BookStore.BookManagement.HttpApi.Host.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
@ -10,18 +10,18 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="0.21.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.MultiTenancy\Volo.Abp.AspNetCore.MultiTenancy.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>

18
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/BookManagementHttpApiHostModule.cs

@ -6,6 +6,7 @@ using Microsoft.Extensions.Hosting;
using Acme.BookStore.BookManagement.EntityFrameworkCore;
using Acme.BookStore.BookManagement.MultiTenancy;
using StackExchange.Redis;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.AspNetCore.MultiTenancy;
@ -40,7 +41,7 @@ namespace Acme.BookStore.BookManagement
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.BuildConfiguration();
var configuration = context.Services.GetConfiguration();
Configure<AbpDbContextOptions>(options =>
{
@ -66,7 +67,7 @@ namespace Acme.BookStore.BookManagement
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info { Title = "BookManagement API", Version = "v1" });
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookManagement API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
@ -131,13 +132,12 @@ namespace Acme.BookStore.BookManagement
{
app.UseMultiTenancy();
}
app.UseAbpRequestLocalization();
//TODO: Enable when Swagger supports ASP.NET Core 3.x
//app.UseSwagger();
//app.UseSwaggerUI(options =>
//{
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
//});
app.UseAbpRequestLocalization();
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
});
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();
}

5
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Controllers/HomeController.cs

@ -7,10 +7,7 @@ namespace Acme.BookStore.BookManagement.Controllers
{
public ActionResult Index()
{
//TODO: Enable when Swagger supports ASP.NET Core 3.x
//return Redirect("/swagger");
return Content("OK: Acme.BookStore.BookManagement.HttpApi.Host is running...");
return Redirect("/swagger");
}
}
}

20
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -24,7 +25,7 @@ namespace Acme.BookStore.BookManagement
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -38,14 +39,13 @@ namespace Acme.BookStore.BookManagement
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

11
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.HttpApi.Host/Startup.cs

@ -9,17 +9,12 @@ namespace Acme.BookStore.BookManagement
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<BookManagementHttpApiHostModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<BookManagementHttpApiHostModule>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}

46
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Acme.BookStore.BookManagement.IdentityServer.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
@ -8,33 +8,33 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Authentication.JwtBearer\Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc\Volo.Abp.AspNetCore.Mvc.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.MultiTenancy\Volo.Abp.AspNetCore.MultiTenancy.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\account\src\Volo.Abp.Account.Web.IdentityServer\Volo.Abp.Account.Web.IdentityServer.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.EntityFrameworkCore\Volo.Abp.IdentityServer.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi\Volo.Abp.PermissionManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.EntityFrameworkCore\Volo.Abp.TenantManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application\Volo.Abp.TenantManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi\Volo.Abp.TenantManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\src\Acme.BookStore.BookManagement.Application.Contracts\Acme.BookStore.BookManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Host.Shared\Acme.BookStore.BookManagement.Host.Shared.csproj" />
</ItemGroup>

16
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/BookManagementIdentityServerModule.cs

@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Acme.BookStore.BookManagement.MultiTenancy;
using StackExchange.Redis;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
@ -64,7 +65,7 @@ namespace Acme.BookStore.BookManagement
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.BuildConfiguration();
var configuration = context.Services.GetConfiguration();
Configure<AbpDbContextOptions>(options =>
{
@ -74,7 +75,7 @@ namespace Acme.BookStore.BookManagement
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info { Title = "BookManagement API", Version = "v1" });
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookManagement API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
@ -147,12 +148,11 @@ namespace Acme.BookStore.BookManagement
}
app.UseIdentityServer();
app.UseAbpRequestLocalization();
//TODO: Enable when Swagger supports ASP.NET Core 3.x
//app.UseSwagger();
//app.UseSwaggerUI(options =>
//{
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
//});
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
});
app.UseAuditing();
app.UseMvcWithDefaultRouteAndArea();

9
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Configuration;
using Volo.Abp.Data;
@ -21,7 +22,7 @@ namespace Acme.BookStore.BookManagement.IdentityServer
private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
private readonly IGuidGenerator _guidGenerator;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IConfigurationAccessor _configurationAccessor;
private readonly IConfiguration _configuration;
public IdentityServerDataSeedContributor(
IClientRepository clientRepository,
@ -29,14 +30,14 @@ namespace Acme.BookStore.BookManagement.IdentityServer
IIdentityResourceDataSeeder identityResourceDataSeeder,
IGuidGenerator guidGenerator,
IPermissionDataSeeder permissionDataSeeder,
IConfigurationAccessor configurationAccessor)
IConfiguration configuration)
{
_clientRepository = clientRepository;
_apiResourceRepository = apiResourceRepository;
_identityResourceDataSeeder = identityResourceDataSeeder;
_guidGenerator = guidGenerator;
_permissionDataSeeder = permissionDataSeeder;
_configurationAccessor = configurationAccessor;
_configuration = configuration;
}
[UnitOfWork]
@ -103,7 +104,7 @@ namespace Acme.BookStore.BookManagement.IdentityServer
"BookManagement"
};
var configurationSection = _configurationAccessor.Configuration.GetSection("IdentityServer:Clients");
var configurationSection = _configuration.GetSection("IdentityServer:Clients");
//Web Client
var webClientId = configurationSection["BookManagement_Web:ClientId"];

20
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -24,7 +25,7 @@ namespace Acme.BookStore.BookManagement
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -38,14 +39,13 @@ namespace Acme.BookStore.BookManagement
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

11
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.IdentityServer/Startup.cs

@ -9,17 +9,12 @@ namespace Acme.BookStore.BookManagement
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<BookManagementIdentityServerModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<BookManagementIdentityServerModule>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}

26
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Acme.BookStore.BookManagement.Web.Host.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
@ -10,22 +10,22 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.OAuth" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.Client\Volo.Abp.AspNetCore.Mvc.Client.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Authentication.OAuth\Volo.Abp.AspNetCore.Authentication.OAuth.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Http.Client.IdentityModel\Volo.Abp.Http.Client.IdentityModel.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi.Client\Volo.Abp.Identity.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Web\Volo.Abp.TenantManagement.Web.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi.Client\Volo.Abp.TenantManagement.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi.Client\Volo.Abp.PermissionManagement.HttpApi.Client.csproj" />
</ItemGroup>
<ItemGroup>

14
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/BookManagementWebHostModule.cs

@ -2,6 +2,7 @@ using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using System.IO;
using Microsoft.AspNetCore.Authentication;
@ -167,7 +168,7 @@ namespace Acme.BookStore.BookManagement
services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info { Title = "BookManagement API", Version = "v1" });
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookManagement API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
}
@ -221,12 +222,11 @@ namespace Acme.BookStore.BookManagement
app.UseAbpRequestLocalization();
//TODO: Enable when Swagger supports ASP.NET Core 3.x
//app.UseSwagger();
//app.UseSwaggerUI(options =>
//{
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "BookManagement API");
//});
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "BookManagement API");
});
app.UseAuditing();

20
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -24,7 +25,7 @@ namespace Acme.BookStore.BookManagement
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -38,14 +39,13 @@ namespace Acme.BookStore.BookManagement
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

9
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Host/Startup.cs

@ -8,14 +8,9 @@ namespace Acme.BookStore.BookManagement
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<BookManagementWebHostModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<BookManagementWebHostModule>();
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)

36
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Acme.BookStore.BookManagement.Web.Unified.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
@ -10,25 +10,25 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="0.21.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Account.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\account\src\Volo.Abp.Account.Web\Volo.Abp.Account.Web.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application\Volo.Abp.TenantManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Web\Volo.Abp.TenantManagement.Web.csproj" />
<ProjectReference Include="..\..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.EntityFrameworkCore\Volo.Abp.TenantManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>

16
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/BookManagementWebUnifiedModule.cs

@ -6,6 +6,7 @@ using Microsoft.Extensions.Hosting;
using Acme.BookStore.BookManagement.EntityFrameworkCore;
using Acme.BookStore.BookManagement.MultiTenancy;
using Acme.BookStore.BookManagement.Web;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
using Volo.Abp.Account.Web;
@ -59,7 +60,7 @@ namespace Acme.BookStore.BookManagement
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.BuildConfiguration();
var configuration = context.Services.GetConfiguration();
Configure<AbpDbContextOptions>(options =>
{
@ -81,7 +82,7 @@ namespace Acme.BookStore.BookManagement
context.Services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new Info { Title = "BookManagement API", Version = "v1" });
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookManagement API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
@ -125,12 +126,11 @@ namespace Acme.BookStore.BookManagement
app.UseMultiTenancy();
}
//TODO: Enabled when Swagger supports ASP.NET Core 3.x
//app.UseSwagger();
//app.UseSwaggerUI(options =>
//{
// options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
//});
app.UseSwagger();
app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
});
app.UseAbpRequestLocalization();
app.UseAuditing();

20
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Program.cs

@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@ -20,7 +21,7 @@ namespace Acme.BookStore.BookManagement
try
{
Log.Information("Starting web host.");
BuildWebHostInternal(args).Run();
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
@ -34,14 +35,13 @@ namespace Acme.BookStore.BookManagement
}
}
public static IWebHost BuildWebHostInternal(string[] args) =>
new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIIS()
.UseIISIntegration()
.UseStartup<Startup>()
.UseSerilog()
.Build();
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

11
samples/BookStore-Modular/modules/book-management/host/Acme.BookStore.BookManagement.Web.Unified/Startup.cs

@ -9,17 +9,12 @@ namespace Acme.BookStore.BookManagement
{
public class Startup
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<BookManagementWebUnifiedModule>(options =>
{
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
services.AddApplication<BookManagementWebUnifiedModule>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}

4
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application.Contracts/Acme.BookStore.BookManagement.Application.Contracts.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Ddd.Application\Volo.Abp.Ddd.Application.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Domain.Shared\Acme.BookStore.BookManagement.Domain.Shared.csproj" />
</ItemGroup>

4
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Application/Acme.BookStore.BookManagement.Application.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Application.Contracts\Acme.BookStore.BookManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Domain\Acme.BookStore.BookManagement.Domain.csproj" />
</ItemGroup>

4
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain.Shared/Acme.BookStore.BookManagement.Domain.Shared.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Localization" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Localization\Volo.Abp.Localization.csproj" />
</ItemGroup>
<ItemGroup>

4
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Domain/Acme.BookStore.BookManagement.Domain.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Ddd.Domain\Volo.Abp.Ddd.Domain.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Domain.Shared\Acme.BookStore.BookManagement.Domain.Shared.csproj" />
</ItemGroup>

4
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.EntityFrameworkCore/Acme.BookStore.BookManagement.EntityFrameworkCore.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore\Volo.Abp.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Domain\Acme.BookStore.BookManagement.Domain.csproj" />
</ItemGroup>

4
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi.Client/Acme.BookStore.BookManagement.HttpApi.Client.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Http.Client\Volo.Abp.Http.Client.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Application.Contracts\Acme.BookStore.BookManagement.Application.Contracts.csproj" />
</ItemGroup>

4
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.HttpApi/Acme.BookStore.BookManagement.HttpApi.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc\Volo.Abp.AspNetCore.Mvc.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Application.Contracts\Acme.BookStore.BookManagement.Application.Contracts.csproj" />
</ItemGroup>

4
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.MongoDB/Acme.BookStore.BookManagement.MongoDB.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.MongoDB" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.MongoDB\Volo.Abp.MongoDB.csproj" />
<ProjectReference Include="..\Acme.BookStore.BookManagement.Domain\Acme.BookStore.BookManagement.Domain.csproj" />
</ItemGroup>

6
samples/BookStore-Modular/modules/book-management/src/Acme.BookStore.BookManagement.Web/Acme.BookStore.BookManagement.Web.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
@ -11,8 +11,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared\Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj" />
</ItemGroup>
<ItemGroup>

4
samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\..\..\framework\src\Volo.Abp.Http.Client.IdentityModel\Volo.Abp.Http.Client.IdentityModel.csproj" />
<ProjectReference Include="..\..\src\Acme.BookStore.BookManagement.HttpApi.Client\Acme.BookStore.BookManagement.HttpApi.Client.csproj" />
</ItemGroup>

37
samples/BookStore-Modular/modules/book-management/test/Acme.BookStore.BookManagement.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs

@ -4,6 +4,7 @@ using System.Threading.Tasks;
using IdentityModel.Client;
using Acme.BookStore.BookManagement.Books;
using Acme.BookStore.BookManagement.Samples;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Configuration;
using Volo.Abp.DependencyInjection;
@ -15,18 +16,18 @@ namespace Acme.BookStore.BookManagement
{
private readonly ISampleAppService _sampleAppService;
private readonly IIdentityModelAuthenticationService _authenticationService;
private readonly IConfigurationAccessor _configurationAccessor;
private readonly IConfiguration _configuration;
private readonly IBookAppService _bookAppService;
public ClientDemoService(
ISampleAppService sampleAppService,
IIdentityModelAuthenticationService authenticationService,
IConfigurationAccessor configurationAccessor,
IConfiguration configuration,
IBookAppService bookAppService)
{
_sampleAppService = sampleAppService;
_authenticationService = authenticationService;
_configurationAccessor = configurationAccessor;
_configuration = configuration;
_bookAppService = bookAppService;
}
@ -71,13 +72,13 @@ namespace Acme.BookStore.BookManagement
var accessToken = await _authenticationService.GetAccessTokenAsync(
new IdentityClientConfiguration(
_configurationAccessor.Configuration["IdentityClients:Default:Authority"],
_configurationAccessor.Configuration["IdentityClients:Default:Scope"],
_configurationAccessor.Configuration["IdentityClients:Default:ClientId"],
_configurationAccessor.Configuration["IdentityClients:Default:ClientSecret"],
_configurationAccessor.Configuration["IdentityClients:Default:GrantType"],
_configurationAccessor.Configuration["IdentityClients:Default:UserName"],
_configurationAccessor.Configuration["IdentityClients:Default:UserPassword"]
_configuration["IdentityClients:Default:Authority"],
_configuration["IdentityClients:Default:Scope"],
_configuration["IdentityClients:Default:ClientId"],
_configuration["IdentityClients:Default:ClientSecret"],
_configuration["IdentityClients:Default:GrantType"],
_configuration["IdentityClients:Default:UserName"],
_configuration["IdentityClients:Default:UserPassword"]
)
);
@ -87,7 +88,7 @@ namespace Acme.BookStore.BookManagement
{
httpClient.SetBearerToken(accessToken);
var url = _configurationAccessor.Configuration["RemoteServices:BookManagement:BaseUrl"] +
var url = _configuration["RemoteServices:BookManagement:BaseUrl"] +
"api/BookManagement/sample/authorized";
var responseMessage = await httpClient.GetAsync(url);
@ -116,7 +117,7 @@ namespace Acme.BookStore.BookManagement
// discover endpoints from metadata
var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync(_configurationAccessor.Configuration["IdentityClients:Default:Authority"]);
var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]);
if (disco.IsError)
{
Console.WriteLine(disco.Error);
@ -127,11 +128,11 @@ namespace Acme.BookStore.BookManagement
var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest
{
Address = disco.TokenEndpoint,
ClientId = _configurationAccessor.Configuration["IdentityClients:Default:ClientId"],
ClientSecret = _configurationAccessor.Configuration["IdentityClients:Default:ClientSecret"],
UserName = _configurationAccessor.Configuration["IdentityClients:Default:UserName"],
Password = _configurationAccessor.Configuration["IdentityClients:Default:UserPassword"],
Scope = _configurationAccessor.Configuration["IdentityClients:Default:Scope"]
ClientId = _configuration["IdentityClients:Default:ClientId"],
ClientSecret = _configuration["IdentityClients:Default:ClientSecret"],
UserName = _configuration["IdentityClients:Default:UserName"],
Password = _configuration["IdentityClients:Default:UserPassword"],
Scope = _configuration["IdentityClients:Default:Scope"]
});
if (tokenResponse.IsError)
@ -148,7 +149,7 @@ namespace Acme.BookStore.BookManagement
{
httpClient.SetBearerToken(tokenResponse.AccessToken);
var url = _configurationAccessor.Configuration["RemoteServices:BookManagement:BaseUrl"] +
var url = _configuration["RemoteServices:BookManagement:BaseUrl"] +
"api/BookManagement/sample/authorized";
var responseMessage = await httpClient.GetAsync(url);

9
samples/BookStore/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj

@ -12,10 +12,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Application.Contracts\Volo.Abp.Account.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application.Contracts\Volo.Abp.Identity.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application.Contracts\Volo.Abp.PermissionManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application.Contracts\Volo.Abp.TenantManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application.Contracts\Volo.Abp.FeatureManagement.Application.Contracts.csproj" />
</ItemGroup>
</Project>

9
samples/BookStore/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj

@ -13,10 +13,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Application\Volo.Abp.Account.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application\Volo.Abp.TenantManagement.Application.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application\Volo.Abp.FeatureManagement.Application.csproj" />
</ItemGroup>
</Project>

2
samples/BookStore/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj

@ -29,7 +29,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj" />
<ProjectReference Include="..\Acme.BookStore.EntityFrameworkCore.DbMigrations\Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj" />
</ItemGroup>

16
samples/BookStore/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj

@ -8,14 +8,14 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain.Shared\Volo.Abp.Identity.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.Domain.Shared\Volo.Abp.IdentityServer.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain.Shared\Volo.Abp.BackgroundJobs.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain.Shared\Volo.Abp.AuditLogging.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain.Shared\Volo.Abp.TenantManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain.Shared\Volo.Abp.FeatureManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Domain.Shared\Volo.Abp.PermissionManagement.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.Domain.Shared\Volo.Abp.SettingManagement.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>

18
samples/BookStore/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj

@ -13,15 +13,15 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="0.21.0" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain\Volo.Abp.Identity.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" />
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.Domain\Volo.Abp.IdentityServer.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.PermissionManagement.Domain.IdentityServer\Volo.Abp.PermissionManagement.Domain.IdentityServer.csproj" />
<ProjectReference Include="..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain\Volo.Abp.BackgroundJobs.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain\Volo.Abp.AuditLogging.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain\Volo.Abp.TenantManagement.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" />
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.Domain\Volo.Abp.SettingManagement.Domain.csproj" />
</ItemGroup>
</Project>

5
samples/BookStore/src/Acme.BookStore.Domain/Book.cs

@ -13,6 +13,11 @@ namespace Acme.BookStore
public float Price { get; set; }
protected Book()
{
}
public Book(Guid id, string name, BookType type, DateTime publishDate, float price)
:base(id)
{

9
samples/BookStore/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Configuration;
using Volo.Abp.Data;
@ -21,7 +22,7 @@ namespace Acme.BookStore.IdentityServer
private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
private readonly IGuidGenerator _guidGenerator;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IConfigurationAccessor _configurationAccessor;
private readonly IConfiguration _configuration;
public IdentityServerDataSeedContributor(
IClientRepository clientRepository,
@ -29,14 +30,14 @@ namespace Acme.BookStore.IdentityServer
IIdentityResourceDataSeeder identityResourceDataSeeder,
IGuidGenerator guidGenerator,
IPermissionDataSeeder permissionDataSeeder,
IConfigurationAccessor configurationAccessor)
IConfiguration configuration)
{
_clientRepository = clientRepository;
_apiResourceRepository = apiResourceRepository;
_identityResourceDataSeeder = identityResourceDataSeeder;
_guidGenerator = guidGenerator;
_permissionDataSeeder = permissionDataSeeder;
_configurationAccessor = configurationAccessor;
_configuration = configuration;
}
[UnitOfWork]
@ -103,7 +104,7 @@ namespace Acme.BookStore.IdentityServer
"BookStore"
};
var configurationSection = _configurationAccessor.Configuration.GetSection("IdentityServer:Clients");
var configurationSection = _configuration.GetSection("IdentityServer:Clients");
//Web Client
var webClientId = configurationSection["BookStore_Web:ClientId"];

18
samples/BookStore/src/Acme.BookStore.EntityFrameworkCore/Acme.BookStore.EntityFrameworkCore.csproj

@ -9,15 +9,15 @@
<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.EntityFrameworkCore\Volo.Abp.IdentityServer.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.EntityFrameworkCore\Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.EntityFrameworkCore\Volo.Abp.TenantManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.EntityFrameworkCore\Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

9
samples/BookStore/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj

@ -12,10 +12,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi.Client" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi.Client\Volo.Abp.Account.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi.Client\Volo.Abp.Identity.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi.Client\Volo.Abp.PermissionManagement.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi.Client\Volo.Abp.TenantManagement.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi.Client\Volo.Abp.FeatureManagement.HttpApi.Client.csproj" />
</ItemGroup>
</Project>

9
samples/BookStore/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj

@ -12,10 +12,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi\Volo.Abp.Account.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi\Volo.Abp.PermissionManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi\Volo.Abp.TenantManagement.HttpApi.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi\Volo.Abp.FeatureManagement.HttpApi.csproj" />
</ItemGroup>
</Project>

18
samples/BookStore/src/Acme.BookStore.Web/Acme.BookStore.Web.csproj

@ -23,9 +23,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0-rc4" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.5.1" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="3.0.0" />
@ -36,13 +36,13 @@
<ProjectReference Include="..\Acme.BookStore.Application\Acme.BookStore.Application.csproj" />
<ProjectReference Include="..\Acme.BookStore.HttpApi\Acme.BookStore.HttpApi.csproj" />
<ProjectReference Include="..\Acme.BookStore.EntityFrameworkCore.DbMigrations\Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Autofac" Version="0.21.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="0.21.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Web" Version="0.21.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Web" Version="0.21.0" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.AspNetCore.Authentication.JwtBearer\Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj" />
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\account\src\Volo.Abp.Account.Web.IdentityServer\Volo.Abp.Account.Web.IdentityServer.csproj" />
<ProjectReference Include="..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Web\Volo.Abp.TenantManagement.Web.csproj" />
<ProjectReference Include="..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Web\Volo.Abp.FeatureManagement.Web.csproj" />
</ItemGroup>
<ItemGroup>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save