Change module architecture for multi-tenancy.

pull/216/head
Halil İbrahim Kalkan 7 years ago
parent 199b24f6f7
commit 0a3beeab9d

@ -288,9 +288,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Serialization.Test
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Authorization.Tests", "test\Volo.Abp.Authorization.Tests\Volo.Abp.Authorization.Tests.csproj", "{B10E37A1-43A1-4042-BAAA-F589302958D5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Permissions.HttpApi", "src\Volo.Abp.Permissions.HttpApi\Volo.Abp.Permissions.HttpApi.csproj", "{94FBE061-CA28-4BDA-9E80-C65EE7E92637}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Permissions.HttpApi", "src\Volo.Abp.Permissions.HttpApi\Volo.Abp.Permissions.HttpApi.csproj", "{94FBE061-CA28-4BDA-9E80-C65EE7E92637}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Permissions.HttpApi.Client", "src\Volo.Abp.Permissions.HttpApi.Client\Volo.Abp.Permissions.HttpApi.Client.csproj", "{01852E73-E8F8-4460-8BBF-9D20C8909366}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Permissions.HttpApi.Client", "src\Volo.Abp.Permissions.HttpApi.Client\Volo.Abp.Permissions.HttpApi.Client.csproj", "{01852E73-E8F8-4460-8BBF-9D20C8909366}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MicroserviceDemo", "MicroserviceDemo", "{3510E248-DC9F-4A07-8134-02E7F5CC5783}"
EndProject
@ -298,9 +298,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MicroserviceDemo.Web", "src
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MicroserviceDemo.TenancyService", "src\MicroserviceDemo\MicroserviceDemo.TenancyService\MicroserviceDemo.TenancyService.csproj", "{067627C7-6891-453A-A219-35141733D776}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.MultiTenancy.HttpApi.Client", "src\Volo.Abp.MultiTenancy.HttpApi.Client\Volo.Abp.MultiTenancy.HttpApi.Client.csproj", "{76D24E2C-8DB0-48B7-9FC4-02231B8B9F39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.MultiTenancy.HttpApi.Proxy", "src\Volo.Abp.MultiTenancy.HttpApi.Proxy\Volo.Abp.MultiTenancy.HttpApi.Proxy.csproj", "{3465B957-0F3A-4BAE-B1A7-EC3D6DCC8A65}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.MultiTenancy.HttpApi.Client", "src\Volo.Abp.MultiTenancy.HttpApi.Client\Volo.Abp.MultiTenancy.HttpApi.Client.csproj", "{76D24E2C-8DB0-48B7-9FC4-02231B8B9F39}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -792,10 +790,6 @@ Global
{76D24E2C-8DB0-48B7-9FC4-02231B8B9F39}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76D24E2C-8DB0-48B7-9FC4-02231B8B9F39}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76D24E2C-8DB0-48B7-9FC4-02231B8B9F39}.Release|Any CPU.Build.0 = Release|Any CPU
{3465B957-0F3A-4BAE-B1A7-EC3D6DCC8A65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3465B957-0F3A-4BAE-B1A7-EC3D6DCC8A65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3465B957-0F3A-4BAE-B1A7-EC3D6DCC8A65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3465B957-0F3A-4BAE-B1A7-EC3D6DCC8A65}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -942,7 +936,6 @@ Global
{258B4E36-BF5B-484D-B10E-7D5AF868FA44} = {3510E248-DC9F-4A07-8134-02E7F5CC5783}
{067627C7-6891-453A-A219-35141733D776} = {3510E248-DC9F-4A07-8134-02E7F5CC5783}
{76D24E2C-8DB0-48B7-9FC4-02231B8B9F39} = {CA154803-3589-47B3-B7CB-B18F94FE1EB6}
{3465B957-0F3A-4BAE-B1A7-EC3D6DCC8A65} = {CA154803-3589-47B3-B7CB-B18F94FE1EB6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5}

@ -0,0 +1,111 @@
2018-02-28 10:18:23.368 +03:00 [Information] Loaded modules:
2018-02-28 10:18:23.444 +03:00 [Information] - Volo.Abp.Castle.AbpCastleCoreModule
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.Autofac.AbpAutofacModule
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.Data.AbpDataModule
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.Settings.AbpSettingsModule
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyAbstractionsModule
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyDomainSharedModule
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.Guids.AbpGuidsModule
2018-02-28 10:18:23.445 +03:00 [Information] - Volo.Abp.ObjectMapping.AbpObjectMappingModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Threading.AbpThreadingModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.EventBus.AbpEventBusModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Validation.AbpValidationModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Security.AbpSecurityModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Authorization.AbpAuthorizationModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Http.AbpHttpAbstractionsModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.AbpDddModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.AutoMapper.AbpAutoMapperModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Ui.AbpUiModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyDomainModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Localization.AbpLocalizationModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Session.AbpSessionModule
2018-02-28 10:18:23.446 +03:00 [Information] - Volo.Abp.Timing.AbpTimingModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.Json.AbpJsonModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.Serialization.AbpSerializationModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.Caching.AbpCachingModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.AbpCommonModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.MultiTenancy.EntityFrameworkCore.AbpMultiTenancyEntityFrameworkCoreModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyApplicationContractsModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyApplicationModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.Http.AbpHttpModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.AspNetCore.AbpAspNetCoreModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule
2018-02-28 10:18:23.447 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyHttpApiModule
2018-02-28 10:18:23.447 +03:00 [Information] - MicroserviceDemo.TenancyService.MicroservicesDemoTenancyServiceModule
2018-02-28 10:18:24.855 +03:00 [Information] Initialized all modules.
2018-02-28 10:18:25.686 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/
2018-02-28 10:18:26.185 +03:00 [Information] Executing action method "MicroserviceDemo.TenancyService.Controllers.HomeController.Index (MicroserviceDemo.TenancyService)" with arguments (null) - ModelState is Valid
2018-02-28 10:18:26.211 +03:00 [Information] Executing RedirectResult, redirecting to "/swagger".
2018-02-28 10:18:26.222 +03:00 [Information] Executed action "MicroserviceDemo.TenancyService.Controllers.HomeController.Index (MicroserviceDemo.TenancyService)" in 132.0196ms
2018-02-28 10:18:26.236 +03:00 [Information] Request finished in 606.1366ms 302
2018-02-28 10:18:26.286 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/swagger/
2018-02-28 10:18:26.322 +03:00 [Information] Request finished in 36.5045ms 200 text/html
2018-02-28 10:18:27.379 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/swagger/v1/swagger.json
2018-02-28 10:18:27.916 +03:00 [Information] Request finished in 537.0078ms 200 application/json
2018-02-28 10:26:40.794 +03:00 [Information] Loaded modules:
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Castle.AbpCastleCoreModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Autofac.AbpAutofacModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Data.AbpDataModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Settings.AbpSettingsModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyAbstractionsModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyDomainSharedModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Guids.AbpGuidsModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.ObjectMapping.AbpObjectMappingModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.Threading.AbpThreadingModule
2018-02-28 10:26:40.839 +03:00 [Information] - Volo.Abp.EventBus.AbpEventBusModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Validation.AbpValidationModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Security.AbpSecurityModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Authorization.AbpAuthorizationModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Http.AbpHttpAbstractionsModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.AbpDddModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.AutoMapper.AbpAutoMapperModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Ui.AbpUiModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyDomainModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Localization.AbpLocalizationModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Session.AbpSessionModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Timing.AbpTimingModule
2018-02-28 10:26:40.840 +03:00 [Information] - Volo.Abp.Json.AbpJsonModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.Serialization.AbpSerializationModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.Caching.AbpCachingModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.AbpCommonModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.MultiTenancy.EntityFrameworkCore.AbpMultiTenancyEntityFrameworkCoreModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyApplicationContractsModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.Http.AbpHttpModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.AspNetCore.AbpAspNetCoreModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyHttpApiModule
2018-02-28 10:26:40.841 +03:00 [Information] - Volo.Abp.MultiTenancy.AbpMultiTenancyApplicationModule
2018-02-28 10:26:40.841 +03:00 [Information] - MicroserviceDemo.TenancyService.MicroservicesDemoTenancyServiceModule
2018-02-28 10:26:41.517 +03:00 [Information] Initialized all modules.
2018-02-28 10:26:41.796 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/
2018-02-28 10:26:41.981 +03:00 [Information] Executing action method "MicroserviceDemo.TenancyService.Controllers.HomeController.Index (MicroserviceDemo.TenancyService)" with arguments (null) - ModelState is Valid
2018-02-28 10:26:41.991 +03:00 [Information] Executing RedirectResult, redirecting to "/swagger".
2018-02-28 10:26:41.997 +03:00 [Information] Executed action "MicroserviceDemo.TenancyService.Controllers.HomeController.Index (MicroserviceDemo.TenancyService)" in 48.397ms
2018-02-28 10:26:42.004 +03:00 [Information] Request finished in 223.508ms 302
2018-02-28 10:26:42.028 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/swagger/
2018-02-28 10:26:42.050 +03:00 [Information] Request finished in 22.5978ms 200 text/html
2018-02-28 10:26:42.363 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/swagger/v1/swagger.json
2018-02-28 10:26:42.655 +03:00 [Information] Request finished in 291.932ms 200 application/json
2018-02-28 10:26:52.866 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/api/multi-tenancy/tenant?SkipCount=0&MaxResultCount=11
2018-02-28 10:26:53.026 +03:00 [Information] Executing action method "Volo.Abp.MultiTenancy.TenantController.GetListAsync (Volo.Abp.MultiTenancy.HttpApi)" with arguments (["Volo.Abp.MultiTenancy.GetTenantsInput"]) - ModelState is Valid
2018-02-28 10:26:53.093 +03:00 [Information] Authorization was successful for user: null.
2018-02-28 10:26:54.213 +03:00 [Information] Executing ObjectResult, writing value "Microsoft.AspNetCore.Mvc.ControllerContext".
2018-02-28 10:26:54.221 +03:00 [Information] Executed action "Volo.Abp.MultiTenancy.TenantController.GetListAsync (Volo.Abp.MultiTenancy.HttpApi)" in 1324.7568ms
2018-02-28 10:26:54.222 +03:00 [Information] Request finished in 1355.0906ms 200 application/json; charset=utf-8
2018-02-28 10:27:23.527 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/api/abp/api-definition
2018-02-28 10:27:23.537 +03:00 [Information] Executing action method "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController.Get (Volo.Abp.AspNetCore.Mvc)" with arguments (null) - ModelState is Valid
2018-02-28 10:27:23.561 +03:00 [Information] Executing ObjectResult, writing value "Microsoft.AspNetCore.Mvc.ControllerContext".
2018-02-28 10:27:23.580 +03:00 [Information] Executed action "Volo.Abp.AspNetCore.Mvc.ApiExploring.AbpApiDefinitionController.Get (Volo.Abp.AspNetCore.Mvc)" in 51.1608ms
2018-02-28 10:27:23.581 +03:00 [Information] Request finished in 54.061ms 200 application/json; charset=utf-8
2018-02-28 10:27:23.661 +03:00 [Information] Request starting HTTP/1.1 GET http://localhost:63877/api/multi-tenancy/tenant?SkipCount=0&MaxResultCount=10&api-version=1.0
2018-02-28 10:27:23.665 +03:00 [Information] Executing action method "Volo.Abp.MultiTenancy.TenantController.GetListAsync (Volo.Abp.MultiTenancy.HttpApi)" with arguments (["Volo.Abp.MultiTenancy.GetTenantsInput"]) - ModelState is Valid
2018-02-28 10:27:23.666 +03:00 [Information] Authorization was successful for user: null.
2018-02-28 10:27:23.688 +03:00 [Information] Executing ObjectResult, writing value "Microsoft.AspNetCore.Mvc.ControllerContext".
2018-02-28 10:27:23.690 +03:00 [Information] Executed action "Volo.Abp.MultiTenancy.TenantController.GetListAsync (Volo.Abp.MultiTenancy.HttpApi)" in 27.1663ms
2018-02-28 10:27:23.690 +03:00 [Information] Request finished in 29.127ms 200 application/json; charset=utf-8

@ -13,6 +13,7 @@
<ItemGroup>
<ProjectReference Include="..\..\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\Volo.Abp.MultiTenancy.Application\Volo.Abp.MultiTenancy.Application.csproj" />
<ProjectReference Include="..\..\Volo.Abp.MultiTenancy.EntityFrameworkCore\Volo.Abp.MultiTenancy.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\Volo.Abp.MultiTenancy.HttpApi\Volo.Abp.MultiTenancy.HttpApi.csproj" />
</ItemGroup>

@ -18,6 +18,7 @@ namespace MicroserviceDemo.TenancyService
[DependsOn(typeof(AbpAutofacModule))]
[DependsOn(typeof(AbpMultiTenancyEntityFrameworkCoreModule))]
[DependsOn(typeof(AbpMultiTenancyHttpApiModule))]
[DependsOn(typeof(AbpMultiTenancyApplicationModule))]
public class MicroservicesDemoTenancyServiceModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)

@ -26,7 +26,6 @@
<ProjectReference Include="..\..\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" />
<ProjectReference Include="..\..\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.csproj" />
<ProjectReference Include="..\..\Volo.Abp.MultiTenancy.HttpApi.Client\Volo.Abp.MultiTenancy.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\Volo.Abp.MultiTenancy.HttpApi.Proxy\Volo.Abp.MultiTenancy.HttpApi.Proxy.csproj" />
<ProjectReference Include="..\..\Volo.Abp.MultiTenancy.Web\Volo.Abp.MultiTenancy.Web.csproj" />
<ProjectReference Include="..\..\Volo.Abp.Permissions.EntityFrameworkCore\Volo.Abp.Permissions.EntityFrameworkCore.csproj" />
</ItemGroup>

@ -32,7 +32,6 @@ namespace MicroserviceDemo.Web
[DependsOn(typeof(AbpIdentityEntityFrameworkCoreModule))]
[DependsOn(typeof(AbpAccountWebModule))]
[DependsOn(typeof(AbpMultiTenancyHttpApiClientModule))]
[DependsOn(typeof(AbpMultiTenancyHttpApiProxyModule))]
[DependsOn(typeof(AbpMultiTenancyWebModule))]
public class MicroservicesDemoWebModule : AbpModule
{

@ -1,25 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Volo.Abp.MultiTenancy.HttpApi.Proxy</AssemblyName>
<PackageId>Volo.Abp.MultiTenancy.HttpApi.Proxy</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc\Volo.Abp.AspNetCore.Mvc.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy.Application.Contracts\Volo.Abp.MultiTenancy.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>
</Project>

@ -1,25 +0,0 @@
using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Modularity;
namespace Volo.Abp.MultiTenancy
{
[DependsOn(typeof(AbpMultiTenancyApplicationContractsModule))]
[DependsOn(typeof(AbpAspNetCoreMvcModule))]
public class AbpMultiTenancyHttpApiProxyModule : AbpModule
{
public override void PreConfigureServices(IServiceCollection services)
{
services.PreConfigure<IMvcCoreBuilder>(options =>
{
options.PartManager.ApplicationParts.Add(new AssemblyPart(typeof(AbpMultiTenancyHttpApiProxyModule).Assembly));
});
}
public override void ConfigureServices(IServiceCollection services)
{
services.AddAssemblyOf<AbpMultiTenancyHttpApiProxyModule>();
}
}
}

@ -19,7 +19,7 @@
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc\Volo.Abp.AspNetCore.Mvc.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy.Application\Volo.Abp.MultiTenancy.Application.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy.Application.Contracts\Volo.Abp.MultiTenancy.Application.Contracts.csproj" />
</ItemGroup>
</Project>

@ -4,23 +4,12 @@ using Volo.Abp.Modularity;
namespace Volo.Abp.MultiTenancy
{
[DependsOn(typeof(AbpMultiTenancyApplicationModule), typeof(AbpAspNetCoreMvcModule))]
[DependsOn(typeof(AbpMultiTenancyApplicationContractsModule), typeof(AbpAspNetCoreMvcModule))]
public class AbpMultiTenancyHttpApiModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddAssemblyOf<AbpMultiTenancyHttpApiModule>();
services.Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(
typeof(AbpMultiTenancyApplicationModule).Assembly,
opts =>
{
opts.RootPath = "multi-tenancy";
}
);
});
}
}
}

@ -3,13 +3,14 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.MultiTenancy
{
[Controller]
[RemoteService]
[Area("multi-tenancy")]
public class TenantController : ITenantAppService //TODO: Throws exception on validation if we inherit from Controller
public class TenantController : ITenantAppService, ITransientDependency //TODO: Throws exception on validation if we inherit from Controller
{
private readonly ITenantAppService _service;

@ -11,7 +11,7 @@ using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.MultiTenancy.Web
{
[DependsOn(typeof(AbpMultiTenancyApplicationContractsModule))]
[DependsOn(typeof(AbpMultiTenancyHttpApiModule))]
[DependsOn(typeof(AbpAspNetCoreMvcUiBootstrapModule))]
[DependsOn(typeof(AbpAutoMapperModule))]
public class AbpMultiTenancyWebModule : AbpModule

@ -19,8 +19,8 @@
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap\Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy.Application.Contracts\Volo.Abp.MultiTenancy.Application.Contracts.csproj" />
<ProjectReference Include="..\Volo.Abp.AutoMapper\Volo.Abp.AutoMapper.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy.HttpApi\Volo.Abp.MultiTenancy.HttpApi.csproj" />
</ItemGroup>
</Project>

Loading…
Cancel
Save