Browse Source

Created Volo.Abp.Ddd.Domain module

pull/272/head
Halil İbrahim Kalkan 9 years ago
parent
commit
2068a4d318
  1. 7
      Volo.Abp.sln
  2. 3
      src/AbpDesk/AbpDesk.Application.Contracts/AbpDesk/AbpDeskApplicationContractsModule.cs
  3. 3
      src/AbpDesk/AbpDesk.Domain/AbpDesk/AbpDeskDomainModule.cs
  4. 3
      src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs
  5. 2
      src/Volo.Abp.Data/Volo/Abp/ISoftDelete.cs
  6. 0
      src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs
  7. 26
      src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj
  8. 2
      src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj.DotSettings
  9. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs
  10. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs
  11. 27
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/AbpDddDomainModule.cs
  12. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/AggregateRoot.cs
  13. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs
  14. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/EntityHelper.cs
  15. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/EntityNotFoundException.cs
  16. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/DomainEventEntry.cs
  17. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEntry.cs
  18. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs
  19. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeReport.cs
  20. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeType.cs
  21. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangedEventData.cs
  22. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangingEventData.cs
  23. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityCreatedEventData.cs
  24. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityCreatingEventData.cs
  25. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityDeletedEventData.cs
  26. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityDeletingEventData.cs
  27. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityEventData.cs
  28. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityUpdatedEventData.cs
  29. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityUpdatingEventData.cs
  30. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/IEntityChangeEventHelper.cs
  31. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/NullEntityChangeEventHelper.cs
  32. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IAggregateRoot.cs
  33. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IEntity.cs
  34. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IGeneratesDomainEvents.cs
  35. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IHasConcurrencyStamp.cs
  36. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs
  37. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IBasicRepository.cs
  38. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs
  39. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/ISupportsExplicitLoading.cs
  40. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs
  41. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs
  42. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs
  43. 22
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Services/DomainService.cs
  44. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Services/IDomainService.cs
  45. 0
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs
  46. 8
      src/Volo.Abp.Ddd/Volo.Abp.Ddd.csproj
  47. 38
      src/Volo.Abp.Ddd/Volo/Abp/AbpServiceBase.cs
  48. 25
      src/Volo.Abp.Ddd/Volo/Abp/Application/AbpDddApplicationModule.cs
  49. 38
      src/Volo.Abp.Ddd/Volo/Abp/Application/Services/ApplicationService.cs
  50. 7
      src/Volo.Abp.Ddd/Volo/Abp/Domain/Services/DomainService.cs
  51. 3
      src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs
  52. 3
      src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs
  53. 3
      src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs
  54. 3
      src/Volo.Abp.IdentityServer.Application.Contracts/Volo/Abp/IdentityServer/AbpIdentityApplicationContractsModule.cs
  55. 3
      src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs
  56. 3
      src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbModule.cs
  57. 3
      src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs
  58. 3
      src/Volo.Abp.MultiTenancy.Application.Contracts/Volo/Abp/MultiTenancy/AbpMultiTenancyApplicationContractsModule.cs
  59. 3
      src/Volo.Abp.MultiTenancy.Domain/Volo/Abp/MultiTenancy/AbpMultiTenancyDomainModule.cs
  60. 3
      src/Volo.Abp.Permissions.Application.Contracts/Volo/Abp/Permissions/AbpPermissionsApplicationContractsModule.cs
  61. 3
      src/Volo.Abp.Permissions.Domain/Volo/Abp/Permissions/AbpPermissionsDomainModule.cs
  62. 3
      src/Volo.Abp.Settings.Domain/Volo/Abp/Settings/AbpSettingsDomainModule.cs
  63. 9
      src/Volo.Abp.Settings.Domain/Volo/Abp/Settings/SettingStore.cs
  64. 3
      test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutofacTestModule.cs
  65. 3
      test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestAppModule.cs

7
Volo.Abp.sln

@ -306,6 +306,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Uow", "src\Volo.Ab
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Uow.Tests", "test\Volo.Abp.Uow.Tests\Volo.Abp.Uow.Tests.csproj", "{9FC49D82-04E5-4170-8618-682BD3350910}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Ddd.Domain", "src\Volo.Abp.Ddd.Domain\Volo.Abp.Ddd.Domain.csproj", "{D1318094-7907-4826-B5F3-CFFC741F235F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -808,6 +810,10 @@ Global
{9FC49D82-04E5-4170-8618-682BD3350910}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FC49D82-04E5-4170-8618-682BD3350910}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FC49D82-04E5-4170-8618-682BD3350910}.Release|Any CPU.Build.0 = Release|Any CPU
{D1318094-7907-4826-B5F3-CFFC741F235F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1318094-7907-4826-B5F3-CFFC741F235F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1318094-7907-4826-B5F3-CFFC741F235F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1318094-7907-4826-B5F3-CFFC741F235F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -957,6 +963,7 @@ Global
{627B88DB-BDCF-4D92-8454-EFE95F4AFB7A} = {37087D1B-3693-4E96-983D-A69F210BDE53}
{23C5849D-4C09-4588-AE32-E31F03B7ED63} = {4C753F64-0C93-4D65-96C2-A40893AFC1E8}
{9FC49D82-04E5-4170-8618-682BD3350910} = {37087D1B-3693-4E96-983D-A69F210BDE53}
{D1318094-7907-4826-B5F3-CFFC741F235F} = {4C753F64-0C93-4D65-96C2-A40893AFC1E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5}

3
src/AbpDesk/AbpDesk.Application.Contracts/AbpDesk/AbpDeskApplicationContractsModule.cs

@ -1,10 +1,11 @@
using Volo.Abp;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
namespace AbpDesk
{
[DependsOn(typeof(AbpCommonModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
public class AbpDeskApplicationContractsModule : AbpModule
{

3
src/AbpDesk/AbpDesk.Domain/AbpDesk/AbpDeskDomainModule.cs

@ -1,11 +1,12 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
namespace AbpDesk
{
[DependsOn(typeof(AbpCommonModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
public class AbpDeskDomainModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)

3
src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs

@ -15,6 +15,7 @@ using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.ViewComponents;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Application;
using Volo.Abp.AspNetCore.Mvc.Conventions;
using Volo.Abp.AspNetCore.Mvc.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.Localization;
@ -26,7 +27,7 @@ using Volo.Abp.Ui;
namespace Volo.Abp.AspNetCore.Mvc
{
[DependsOn(typeof(AbpHttpModule))]
[DependsOn(typeof(AbpDddModule))] //TODO: Ideally, AbpAspNetCoreMvcModule should not depend on Ddd module...?
[DependsOn(typeof(AbpDddApplicationModule))] //TODO: Ideally, AbpAspNetCoreMvcModule should not depend on Ddd module...?
[DependsOn(typeof(AbpAspNetCoreModule))]
[DependsOn(typeof(AbpUiModule))]
public class AbpAspNetCoreMvcModule : AbpModule

2
src/Volo.Abp.Ddd/Volo/Abp/ISoftDelete.cs → src/Volo.Abp.Data/Volo/Abp/ISoftDelete.cs

@ -6,7 +6,7 @@
/// marked as IsDeleted = true in the database,
/// but can not be retrieved to the application normally.
/// </summary>
public interface ISoftDelete //TODO: Move to another assembly. Data?
public interface ISoftDelete //TODO: Move to another assembly?
{
/// <summary>
/// Used to mark an Entity as 'Deleted'.

0
src/Volo.Abp.Ddd/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs → src/Volo.Abp.Ddd.Domain/Microsoft/Extensions/DependencyInjection/ServiceCollectionRepositoryExtensions.cs

26
src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Volo.Abp.Ddd.Domain</AssemblyName>
<PackageId>Volo.Abp.Ddd.Domain</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.Core\Volo.Abp.Core.csproj" />
<ProjectReference Include="..\Volo.Abp.Data\Volo.Abp.Data.csproj" />
<ProjectReference Include="..\Volo.Abp.EventBus\Volo.Abp.EventBus.csproj" />
<ProjectReference Include="..\Volo.Abp.Guids\Volo.Abp.Guids.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy.Abstractions\Volo.Abp.MultiTenancy.Abstractions.csproj" />
<ProjectReference Include="..\Volo.Abp.Threading\Volo.Abp.Threading.csproj" />
<ProjectReference Include="..\Volo.Abp.Uow\Volo.Abp.Uow.csproj" />
</ItemGroup>
</Project>

2
src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj.DotSettings

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp71</s:String></wpf:ResourceDictionary>

0
src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/CommonDbContextRegistrationOptions.cs

0
src/Volo.Abp.Ddd/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/DependencyInjection/ICommonDbContextRegistrationOptionsBuilder.cs

27
src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/AbpDddDomainModule.cs

@ -0,0 +1,27 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Data;
using Volo.Abp.EventBus;
using Volo.Abp.Guids;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Threading;
using Volo.Abp.Uow;
namespace Volo.Abp.Domain
{
[DependsOn(
typeof(AbpDataModule),
typeof(AbpEventBusModule),
typeof(AbpGuidsModule),
typeof(AbpMultiTenancyAbstractionsModule),
typeof(AbpThreadingModule),
typeof(AbpUnitOfWorkModule)
)]
public class AbpDddDomainModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddAssemblyOf<AbpDddDomainModule>();
}
}
}

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/AggregateRoot.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/AggregateRoot.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Entity.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/EntityHelper.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/EntityHelper.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/EntityNotFoundException.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/EntityNotFoundException.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/DomainEventEntry.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/DomainEventEntry.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityChangeEntry.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEntry.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeEventHelper.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityChangeReport.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeReport.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityChangeType.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangeType.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityChangedEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangedEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityChangingEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityChangingEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityCreatedEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityCreatedEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityCreatingEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityCreatingEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityDeletedEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityDeletedEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityDeletingEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityDeletingEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityUpdatedEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityUpdatedEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/EntityUpdatingEventData.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/EntityUpdatingEventData.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/IEntityChangeEventHelper.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/IEntityChangeEventHelper.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/Events/NullEntityChangeEventHelper.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/NullEntityChangeEventHelper.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IAggregateRoot.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IAggregateRoot.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IEntity.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IEntity.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IGeneratesDomainEvents.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IGeneratesDomainEvents.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Entities/IHasConcurrencyStamp.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IHasConcurrencyStamp.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/BasicRepositoryBase.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IBasicRepository.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IBasicRepository.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/IRepository.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/IRepository.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/ISupportsExplicitLoading.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/ISupportsExplicitLoading.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryBase.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryBase.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryExtensions.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Repositories/RepositoryRegistrarBase.cs

22
src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Services/DomainService.cs

@ -0,0 +1,22 @@
using System;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Guids;
namespace Volo.Abp.Domain.Services
{
public abstract class DomainService : IDomainService
{
public IGuidGenerator GuidGenerator { get; set; }
public ILoggerFactory LoggerFactory { get; set; }
protected ILogger Logger => _lazyLogger.Value;
private Lazy<ILogger> _lazyLogger => new Lazy<ILogger>(() => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance, true);
protected DomainService()
{
GuidGenerator = SimpleGuidGenerator.Instance;
}
}
}

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Services/IDomainService.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Services/IDomainService.cs

0
src/Volo.Abp.Ddd/Volo/Abp/Domain/Values/ValueObject.cs → src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs

8
src/Volo.Abp.Ddd/Volo.Abp.Ddd.csproj

@ -16,14 +16,10 @@
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.Authorization\Volo.Abp.Authorization.csproj" />
<ProjectReference Include="..\Volo.Abp.Core\Volo.Abp.Core.csproj" />
<ProjectReference Include="..\Volo.Abp.Data\Volo.Abp.Data.csproj" />
<ProjectReference Include="..\Volo.Abp.EventBus\Volo.Abp.EventBus.csproj" />
<ProjectReference Include="..\Volo.Abp.Guids\Volo.Abp.Guids.csproj" />
<ProjectReference Include="..\Volo.Abp.Ddd.Domain\Volo.Abp.Ddd.Domain.csproj" />
<ProjectReference Include="..\Volo.Abp.Http.Abstractions\Volo.Abp.Http.Abstractions.csproj" />
<ProjectReference Include="..\Volo.Abp.MultiTenancy.Abstractions\Volo.Abp.MultiTenancy.Abstractions.csproj" />
<ProjectReference Include="..\Volo.Abp.ObjectMapping\Volo.Abp.ObjectMapping.csproj" />
<ProjectReference Include="..\Volo.Abp.Threading\Volo.Abp.Threading.csproj" />
<ProjectReference Include="..\Volo.Abp.Uow\Volo.Abp.Uow.csproj" />
<ProjectReference Include="..\Volo.Abp.Session\Volo.Abp.Session.csproj" />
<ProjectReference Include="..\Volo.Abp.Validation\Volo.Abp.Validation.csproj" />
</ItemGroup>

38
src/Volo.Abp.Ddd/Volo/Abp/AbpServiceBase.cs

@ -1,38 +0,0 @@
using System;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Uow;
namespace Volo.Abp
{
public abstract class AbpServiceBase //TODO: This is not so related to DDD, can we move to another package or completely remove it..?
{
public IUnitOfWorkManager UnitOfWorkManager { get; set; }
public IObjectMapper ObjectMapper { get; set; }
public IGuidGenerator GuidGenerator { get; set; }
public ILoggerFactory LoggerFactory { get; set; }
public ICurrentTenant CurrentTenant { get; set; }
protected IUnitOfWork CurrentUnitOfWork => UnitOfWorkManager?.Current;
protected ILogger Logger => _lazyLogger.Value;
private Lazy<ILogger> _lazyLogger => new Lazy<ILogger>(() => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance, true);
/* Will be added when developed
- Setting manager
- Localization manager and helper methods
*/
protected AbpServiceBase()
{
GuidGenerator = SimpleGuidGenerator.Instance;
}
}
}

25
src/Volo.Abp.Ddd/Volo/Abp/AbpDddModule.cs → src/Volo.Abp.Ddd/Volo/Abp/Application/AbpDddApplicationModule.cs

@ -2,34 +2,23 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application.Services;
using Volo.Abp.Authorization;
using Volo.Abp.Data;
using Volo.Abp.EventBus;
using Volo.Abp.Guids;
using Volo.Abp.Domain;
using Volo.Abp.Http;
using Volo.Abp.Http.Modeling;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Threading;
using Volo.Abp.Uow;
using Volo.Abp.Session;
using Volo.Abp.Validation;
namespace Volo.Abp
namespace Volo.Abp.Application
{
//TODO: Consider to split this DDD package by layers!
[DependsOn(typeof(AbpGuidsModule))]
[DependsOn(typeof(AbpDataModule))]
[DependsOn(typeof(AbpDddDomainModule))]
[DependsOn(typeof(AbpSessionModule))]
[DependsOn(typeof(AbpObjectMappingModule))]
[DependsOn(typeof(AbpMultiTenancyAbstractionsModule))]
[DependsOn(typeof(AbpThreadingModule))]
[DependsOn(typeof(AbpEventBusModule))]
[DependsOn(typeof(AbpValidationModule))]
[DependsOn(typeof(AbpAuthorizationModule))]
[DependsOn(typeof(AbpGuidsModule))]
[DependsOn(typeof(AbpUnitOfWorkModule))]
[DependsOn(typeof(AbpHttpAbstractionsModule))]
public class AbpDddModule : AbpModule
public class AbpDddApplicationModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
{
@ -39,7 +28,7 @@ namespace Volo.Abp
options.IgnoredInterfaces.AddIfNotContains(typeof(IApplicationService));
});
services.AddAssemblyOf<AbpDddModule>();
services.AddAssemblyOf<AbpDddApplicationModule>();
}
}
}

38
src/Volo.Abp.Ddd/Volo/Abp/Application/Services/ApplicationService.cs

@ -1,9 +1,18 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Aspects;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectMapping;
using Volo.Abp.Session;
using Volo.Abp.Uow;
namespace Volo.Abp.Application.Services
{
public abstract class ApplicationService : AbpServiceBase, IApplicationService, IAvoidDuplicateCrossCuttingConcerns
public abstract class ApplicationService : IApplicationService, IAvoidDuplicateCrossCuttingConcerns
{
public static string[] CommonPostfixes { get; set; } = { "AppService", "ApplicationService", "Service" };
@ -12,11 +21,28 @@ namespace Volo.Abp.Application.Services
/// </summary>
public List<string> AppliedCrossCuttingConcerns { get; } = new List<string>();
/* Will be added when implemented
- AbpSession
- ...
*/
public IUnitOfWorkManager UnitOfWorkManager { get; set; }
//TODO: Add IPermissionChecker (but before split layers of DDD!)
public IObjectMapper ObjectMapper { get; set; }
public IGuidGenerator GuidGenerator { get; set; }
public ILoggerFactory LoggerFactory { get; set; }
public ICurrentTenant CurrentTenant { get; set; }
public ICurrentUser CurrentUser { get; set; }
public IAuthorizationService AuthorizationService { get; set; }
protected IUnitOfWork CurrentUnitOfWork => UnitOfWorkManager?.Current;
protected ILogger Logger => _lazyLogger.Value;
private Lazy<ILogger> _lazyLogger => new Lazy<ILogger>(() => LoggerFactory?.CreateLogger(GetType().FullName) ?? NullLogger.Instance, true);
protected ApplicationService()
{
GuidGenerator = SimpleGuidGenerator.Instance;
}
}
}

7
src/Volo.Abp.Ddd/Volo/Abp/Domain/Services/DomainService.cs

@ -1,7 +0,0 @@
namespace Volo.Abp.Domain.Services
{
public abstract class DomainService : AbpServiceBase, IDomainService
{
}
}

3
src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpEntityFrameworkCoreModule.cs

@ -1,12 +1,13 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.Uow.EntityFrameworkCore;
namespace Volo.Abp.EntityFrameworkCore
{
[DependsOn(typeof(AbpCommonModule))]
[DependsOn(typeof(AbpDddModule))] //TODO: Is it possible to not depend DDD and seperate to another module?
[DependsOn(typeof(AbpDddApplicationModule))] //TODO: Is it possible to not depend DDD and seperate to another module?
public class AbpEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)

3
src/Volo.Abp.Identity.Application.Contracts/Volo/Abp/Identity/AbpIdentityApplicationContractsModule.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Authorization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Modularity;
@ -8,7 +9,7 @@ namespace Volo.Abp.Identity
{
[DependsOn(typeof(AbpIdentityDomainSharedModule))]
[DependsOn(typeof(AbpAuthorizationModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpPermissionsApplicationContractsModule))]
public class AbpIdentityApplicationContractsModule : AbpModule
{

3
src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/AbpIdentityDomainModule.cs

@ -1,11 +1,12 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.Permissions;
namespace Volo.Abp.Identity
{
[DependsOn(typeof(AbpPermissionsDomainModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpIdentityDomainSharedModule))]
public class AbpIdentityDomainModule : AbpModule
{

3
src/Volo.Abp.IdentityServer.Application.Contracts/Volo/Abp/IdentityServer/AbpIdentityApplicationContractsModule.cs

@ -1,9 +1,10 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
namespace Volo.Abp.IdentityServer
{
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpIdentityServerDomainSharedModule))]
public class AbpIdentityServerApplicationContractsModule : AbpModule
{

3
src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerDomainModule.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer.AspNetIdentity;
@ -9,7 +10,7 @@ using Volo.Abp.Security;
namespace Volo.Abp.IdentityServer
{
[DependsOn(typeof(AbpIdentityServerDomainSharedModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpAutoMapperModule))]
[DependsOn(typeof(AbpIdentityDomainModule))]
[DependsOn(typeof(AbpSecurityModule))]

3
src/Volo.Abp.MemoryDb/Volo/Abp/MemoryDb/AbpMemoryDbModule.cs

@ -1,12 +1,13 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.Uow.MemoryDb;
namespace Volo.Abp.MemoryDb
{
[DependsOn(typeof(AbpCommonModule))]
[DependsOn(typeof(AbpDddModule))] //TODO: Is it possible to not depend DDD and seperate to another module?
[DependsOn(typeof(AbpDddApplicationModule))] //TODO: Is it possible to not depend DDD and seperate to another module?
public class AbpMemoryDbModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)

3
src/Volo.Abp.MongoDB/Volo/Abp/MongoDB/AbpMongoDbModule.cs

@ -1,12 +1,13 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.Uow.MongoDB;
namespace Volo.Abp.MongoDB
{
[DependsOn(typeof(AbpCommonModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
public class AbpMongoDbModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)

3
src/Volo.Abp.MultiTenancy.Application.Contracts/Volo/Abp/MultiTenancy/AbpMultiTenancyApplicationContractsModule.cs

@ -1,10 +1,11 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Modularity;
namespace Volo.Abp.MultiTenancy
{
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpMultiTenancyDomainSharedModule))]
public class AbpMultiTenancyApplicationContractsModule : AbpModule
{

3
src/Volo.Abp.MultiTenancy.Domain/Volo/Abp/MultiTenancy/AbpMultiTenancyDomainModule.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Data;
using Volo.Abp.Modularity;
@ -9,7 +10,7 @@ namespace Volo.Abp.MultiTenancy
[DependsOn(typeof(AbpMultiTenancyAbstractionsModule))]
[DependsOn(typeof(AbpMultiTenancyDomainSharedModule))]
[DependsOn(typeof(AbpDataModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpAutoMapperModule))]
[DependsOn(typeof(AbpUiModule))] //TODO: It's not good to depend on the UI module. However, UserFriendlyException is inside it!
public class AbpMultiTenancyDomainModule : AbpModule

3
src/Volo.Abp.Permissions.Application.Contracts/Volo/Abp/Permissions/AbpPermissionsApplicationContractsModule.cs

@ -1,9 +1,10 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
namespace Volo.Abp.Permissions
{
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpPermissionsDomainSharedModule))]
public class AbpPermissionsApplicationContractsModule : AbpModule
{

3
src/Volo.Abp.Permissions.Domain/Volo/Abp/Permissions/AbpPermissionsDomainModule.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Authorization;
using Volo.Abp.Caching;
using Volo.Abp.Json;
@ -7,7 +8,7 @@ using Volo.Abp.Modularity;
namespace Volo.Abp.Permissions
{
[DependsOn(typeof(AbpAuthorizationModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpPermissionsDomainSharedModule))]
[DependsOn(typeof(AbpCachingModule))]
[DependsOn(typeof(AbpJsonModule))]

3
src/Volo.Abp.Settings.Domain/Volo/Abp/Settings/AbpSettingsDomainModule.cs

@ -1,10 +1,11 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
namespace Volo.Abp.Settings
{
[DependsOn(typeof(AbpSettingsModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpSettingsDomainSharedModule))]
public class AbpSettingsDomainModule : AbpModule
{

9
src/Volo.Abp.Settings.Domain/Volo/Abp/Settings/SettingStore.cs

@ -2,16 +2,19 @@
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
namespace Volo.Abp.Settings
{
public class SettingStore : AbpServiceBase, ISettingStore, ITransientDependency
public class SettingStore : ISettingStore, ITransientDependency
{
private readonly ISettingRepository _settingRepository;
private readonly IGuidGenerator _guidGenerator;
public SettingStore(ISettingRepository settingRepository)
public SettingStore(ISettingRepository settingRepository, IGuidGenerator guidGenerator)
{
_settingRepository = settingRepository;
_guidGenerator = guidGenerator;
}
public async Task<string> GetOrNullAsync(string name, string providerName, string providerKey)
@ -25,7 +28,7 @@ namespace Volo.Abp.Settings
var setting = await _settingRepository.FindAsync(name, providerName, providerKey);
if (setting == null)
{
setting = new Setting(GuidGenerator.Create(), name, value, providerName, providerKey);
setting = new Setting(_guidGenerator.Create(), name, value, providerName, providerKey);
await _settingRepository.InsertAsync(setting);
}
else

3
test/Volo.Abp.AutoMapper.Tests/Volo/Abp/AutoMapper/AutofacTestModule.cs

@ -1,9 +1,10 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
namespace Volo.Abp.AutoMapper
{
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
[DependsOn(typeof(AbpAutoMapperModule))]
[DependsOn(typeof(AbpCommonModule))]
public class AutoMapperTestModule : AbpModule

3
test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestAppModule.cs

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.TestApp.Domain;
using Volo.Abp.AutoMapper;
@ -8,7 +9,7 @@ namespace Volo.Abp.TestApp
{
[DependsOn(typeof(AbpAutoMapperModule))]
[DependsOn(typeof(AbpCommonModule))]
[DependsOn(typeof(AbpDddModule))]
[DependsOn(typeof(AbpDddApplicationModule))]
public class TestAppModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)

Loading…
Cancel
Save