Browse Source

feat: 移除多余文件

pull/126/head
wangjun 3 years ago
parent
commit
fe11d88e0b
  1. 15
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Services/BlogAppService.cs
  2. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/FodyWeavers.xml
  3. 30
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/FodyWeavers.xsd
  4. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts.abppkg.json
  5. 16
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts.csproj
  6. 18
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Permissions/TestsPermissionDefinitionProvider.cs
  7. 13
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Permissions/TestsPermissions.cs
  8. 11
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Samples/ISampleAppService.cs
  9. 6
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Samples/SampleDto.cs
  10. 15
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/TestsApplicationContractsModule.cs
  11. 8
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/TestsRemoteServiceConsts.cs
  12. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/FodyWeavers.xml
  13. 30
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/FodyWeavers.xsd
  14. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/Lion.AbpPro.EntityFrameworkCore.Tests.Application.abppkg.json
  15. 16
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/Lion.AbpPro.EntityFrameworkCore.Tests.Application.csproj
  16. 38
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/Samples/SampleAppService.cs
  17. 13
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/TestsAppService.cs
  18. 13
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/TestsApplicationAutoMapperProfile.cs
  19. 24
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/TestsApplicationModule.cs
  20. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/FodyWeavers.xml
  21. 30
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/FodyWeavers.xsd
  22. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared.abppkg.json
  23. 25
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared.csproj
  24. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/ar.json
  25. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/cs.json
  26. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/de.json
  27. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/en-GB.json
  28. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/en.json
  29. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/es.json
  30. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/fi.json
  31. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/fr.json
  32. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/hi.json
  33. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/hu.json
  34. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/is.json
  35. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/it.json
  36. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/nl.json
  37. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/pl-PL.json
  38. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/pt-BR.json
  39. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/ro-RO.json
  40. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/ru.json
  41. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/sk.json
  42. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/sl.json
  43. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/tr.json
  44. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/vi.json
  45. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/zh-Hans.json
  46. 7
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/zh-Hant.json
  47. 9
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/TestsResource.cs
  48. 36
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/TestsDomainSharedModule.cs
  49. 6
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/TestsErrorCodes.cs
  50. 69
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Blogs/Blogs.cs
  51. 65
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Blogs/Comment.cs
  52. 10
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Blogs/IBlogsRepository.cs
  53. 57
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Blogs/Post.cs
  54. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/FodyWeavers.xml
  55. 30
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/FodyWeavers.xsd
  56. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.abppkg.json
  57. 16
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.csproj
  58. 13
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Settings/TestsSettingDefinitionProvider.cs
  59. 10
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Settings/TestsSettings.cs
  60. 10
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/TestsDbProperties.cs
  61. 13
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/TestsDomainModule.cs
  62. 19
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/Blogs/EfCoreBlogQueryableExtensions.cs
  63. 36
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/Blogs/EfCoreBlogsRepository.cs
  64. 12
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/ITestsDbContext.cs
  65. 29
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/TestsDbContext.cs
  66. 38
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/TestsDbContextModelCreatingExtensions.cs
  67. 22
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/TestsEntityFrameworkCoreModule.cs
  68. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/FodyWeavers.xml
  69. 30
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/FodyWeavers.xsd
  70. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore.abppkg.json
  71. 16
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore.csproj
  72. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/FodyWeavers.xml
  73. 30
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/FodyWeavers.xsd
  74. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client.abppkg.json
  75. 20
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client.csproj
  76. 26
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/TestsHttpApiClientModule.cs
  77. 12
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Controllers/HomeController.cs
  78. 18
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Dockerfile
  79. 20
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/EntityFrameworkCore/TestsHttpApiHostMigrationsDbContext.cs
  80. 27
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/EntityFrameworkCore/TestsHttpApiHostMigrationsDbContextFactory.cs
  81. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/FodyWeavers.xml
  82. 30
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/FodyWeavers.xsd
  83. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host.abppkg.json
  84. 44
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host.csproj
  85. 17
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Logs/logs.txt
  86. 28
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Migrations/20230619095614_Init.Designer.cs
  87. 23
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Migrations/20230619095614_Init.cs
  88. 25
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Migrations/TestsHttpApiHostMigrationsDbContextModelSnapshot.cs
  89. 56
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Program.cs
  90. 27
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Properties/launchSettings.json
  91. 192
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/TestsHttpApiHostModule.cs
  92. 12
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/appsettings.json
  93. 2
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/appsettings.secrets.json
  94. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/FodyWeavers.xml
  95. 30
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/FodyWeavers.xsd
  96. 3
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.abppkg.json
  97. 16
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.csproj
  98. 33
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/Samples/SampleController.cs
  99. 12
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/TestsController.cs
  100. 32
      aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/TestsHttpApiModule.cs

15
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Services/BlogAppService.cs

@ -88,21 +88,6 @@ public class BlogAppService : ApplicationService
throw new UserFriendlyException("test");
}
public async Task CreateManualAsync()
{
var list = new List<Blog>
{
new Blog()
{
Name = "001",
//CreationTime = Clock.Now,
}
};
await _blogRepository.InsertManyAsync(list);
}
/// <summary>
/// 批量更新
/// <see cref="https://learn.microsoft.com/zh-cn/ef/core/saving/execute-insert-update-delete"/>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts.abppkg.json

@ -1,3 +0,0 @@
{
"role": "lib.application-contracts"
}

16
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Lion.AbpPro.EntityFrameworkCore.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="7.2.2" />
<PackageReference Include="Volo.Abp.Authorization" Version="7.2.2" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared\Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared.csproj" />
</ItemGroup>
</Project>

18
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Permissions/TestsPermissionDefinitionProvider.cs

@ -1,18 +0,0 @@
using Lion.AbpPro.EntityFrameworkCore.Tests.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Permissions;
public class TestsPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var myGroup = context.AddGroup(TestsPermissions.GroupName, L("Permission:Tests"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<TestsResource>(name);
}
}

13
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Permissions/TestsPermissions.cs

@ -1,13 +0,0 @@
using Volo.Abp.Reflection;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Permissions;
public class TestsPermissions
{
public const string GroupName = "Tests";
public static string[] GetAll()
{
return ReflectionHelper.GetPublicConstantsRecursively(typeof(TestsPermissions));
}
}

11
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Samples/ISampleAppService.cs

@ -1,11 +0,0 @@
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Samples;
public interface ISampleAppService : IApplicationService
{
Task<SampleDto> GetAsync();
Task<SampleDto> GetAuthorizedAsync();
}

6
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/Samples/SampleDto.cs

@ -1,6 +0,0 @@
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Samples;
public class SampleDto
{
public int Value { get; set; }
}

15
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/TestsApplicationContractsModule.cs

@ -1,15 +0,0 @@
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Volo.Abp.Authorization;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
[DependsOn(
typeof(TestsDomainSharedModule),
typeof(AbpDddApplicationContractsModule),
typeof(AbpAuthorizationModule)
)]
public class TestsApplicationContractsModule : AbpModule
{
}

8
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts/TestsRemoteServiceConsts.cs

@ -1,8 +0,0 @@
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
public class TestsRemoteServiceConsts
{
public const string RemoteServiceName = "Tests";
public const string ModuleName = "tests";
}

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/Lion.AbpPro.EntityFrameworkCore.Tests.Application.abppkg.json

@ -1,3 +0,0 @@
{
"role": "lib.application"
}

16
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/Lion.AbpPro.EntityFrameworkCore.Tests.Application.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Lion.AbpPro.EntityFrameworkCore.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="7.2.2" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="7.2.2" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts\Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts.csproj" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.Domain\Lion.AbpPro.EntityFrameworkCore.Tests.Domain.csproj" />
</ItemGroup>
</Project>

38
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/Samples/SampleAppService.cs

@ -1,38 +0,0 @@
using System.Threading.Tasks;
using Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
using Microsoft.AspNetCore.Authorization;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Samples;
public class SampleAppService : TestsAppService, ISampleAppService
{
private readonly IBlogRepository _blogRepository;
public SampleAppService(IBlogRepository blogRepository)
{
_blogRepository = blogRepository;
}
public Task<SampleDto> GetAsync()
{
var blog = new Blog(GuidGenerator.Create(),GuidGenerator.Create().ToString(),"001");
_blogRepository.InsertManyAsync(new List<Blog>() { blog });
return Task.FromResult(
new SampleDto
{
Value = 42
}
);
}
[Authorize]
public Task<SampleDto> GetAuthorizedAsync()
{
return Task.FromResult(
new SampleDto
{
Value = 42
}
);
}
}

13
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/TestsAppService.cs

@ -1,13 +0,0 @@
using Lion.AbpPro.EntityFrameworkCore.Tests.Localization;
using Volo.Abp.Application.Services;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
public abstract class TestsAppService : ApplicationService
{
protected TestsAppService()
{
LocalizationResource = typeof(TestsResource);
ObjectMapperContext = typeof(TestsApplicationModule);
}
}

13
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/TestsApplicationAutoMapperProfile.cs

@ -1,13 +0,0 @@
using AutoMapper;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
public class TestsApplicationAutoMapperProfile : Profile
{
public TestsApplicationAutoMapperProfile()
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
}
}

24
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Application/TestsApplicationModule.cs

@ -1,24 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.Application;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
[DependsOn(
typeof(TestsDomainModule),
typeof(TestsApplicationContractsModule),
typeof(AbpDddApplicationModule),
typeof(AbpAutoMapperModule)
)]
public class TestsApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<TestsApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<TestsApplicationModule>(validate: true);
});
}
}

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared.abppkg.json

@ -1,3 +0,0 @@
{
"role": "lib.domain-shared"
}

25
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared.csproj

@ -1,25 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Lion.AbpPro.EntityFrameworkCore.Tests</RootNamespace>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Validation" Version="7.2.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\Tests\*.json" />
<Content Remove="Localization\Tests\*.json" />
</ItemGroup>
</Project>

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/ar.json

@ -1,7 +0,0 @@
{
"culture": "ar",
"texts": {
"MyAccount": "إدارة ملفى",
"SamplePageMessage": "صفحة نموذجية للوحدة النمطية Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/cs.json

@ -1,7 +0,0 @@
{
"culture": "cs",
"texts": {
"MyAccount": "Spravovat profil",
"SamplePageMessage": "Ukázková stránka pro modul Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/de.json

@ -1,7 +0,0 @@
{
"culture": "de",
"texts": {
"MyAccount": "Mein Konto",
"SamplePageMessage": "Eine Beispielseite für das Modul TestsModul"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/en-GB.json

@ -1,7 +0,0 @@
{
"culture": "en-GB",
"texts": {
"MyAccount": "My account",
"SamplePageMessage": "A sample page for the Tests module"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/en.json

@ -1,7 +0,0 @@
{
"culture": "en",
"texts": {
"MyAccount": "My account",
"SamplePageMessage": "A sample page for the Tests module"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/es.json

@ -1,7 +0,0 @@
{
"culture": "es",
"texts": {
"MyAccount": "Mi cuenta",
"SamplePageMessage": "Una página de ejemplo para el módulo Tests "
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/fi.json

@ -1,7 +0,0 @@
{
"culture": "fi",
"texts": {
"MyAccount": "Tilini",
"SamplePageMessage": "Esimerkkisivu Tests-moduulille"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/fr.json

@ -1,7 +0,0 @@
{
"culture": "fr",
"texts": {
"MyAccount": "Mon compte",
"SamplePageMessage": "Exemple de page pour le module Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/hi.json

@ -1,7 +0,0 @@
{
"culture": "hi",
"texts": {
"MyAccount": "मेरा खाता",
"SamplePageMessage": "Tests मॉड्यूल के लिए एक नमूना पृष्ठ"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/hu.json

@ -1,7 +0,0 @@
{
"culture": "hu",
"texts": {
"MyAccount": "A fiókom",
"SamplePageMessage": "Mintaoldal a Tests modulhoz"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/is.json

@ -1,7 +0,0 @@
{
"culture": "is",
"texts": {
"MyAccount": "Minn aðgangur",
"SamplePageMessage": "Dæmi um síðu fyrir Tests eininguna"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/it.json

@ -1,7 +0,0 @@
{
"culture": "it",
"texts": {
"MyAccount": "Il mio conto",
"SamplePageMessage": "Una pagina di esempio per il modulo Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/nl.json

@ -1,7 +0,0 @@
{
"culture": "nl",
"texts": {
"MyAccount": "Mijn rekening",
"SamplePageMessage": "Een voorbeeldpagina voor de Tests module"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/pl-PL.json

@ -1,7 +0,0 @@
{
"culture": "pl-PL",
"texts": {
"MyAccount": "Moje konto",
"SamplePageMessage": "Przykładowa strona modułu Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/pt-BR.json

@ -1,7 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"MyAccount": "Minha conta",
"SamplePageMessage": "Uma página de amostra para o módulo Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/ro-RO.json

@ -1,7 +0,0 @@
{
"culture": "ro-RO",
"texts": {
"MyAccount": "Contul meu",
"SamplePageMessage": "Un exemplu de pagină pentru modululul Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/ru.json

@ -1,7 +0,0 @@
{
"culture": "ru",
"texts": {
"MyAccount": "Мой аккаунт",
"SamplePageMessage": "Пример страницы для модуля Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/sk.json

@ -1,7 +0,0 @@
{
"culture": "sk",
"texts": {
"MyAccount": "Môj účet",
"SamplePageMessage": "Ukážka stránky pre modul Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/sl.json

@ -1,7 +0,0 @@
{
"culture": "sl",
"texts": {
"MyAccount": "Moj račun",
"SamplePageMessage": "Vzorčna stran za modul Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/tr.json

@ -1,7 +0,0 @@
{
"culture": "tr",
"texts": {
"MyAccount": "Hesabım",
"SamplePageMessage": "Tests modulünden örnek bir sayfa"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/vi.json

@ -1,7 +0,0 @@
{
"culture": "vi",
"texts": {
"MyAccount": "Tài khoản của tôi",
"SamplePageMessage": "Trang mẫu cho mô-đun Tests"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/zh-Hans.json

@ -1,7 +0,0 @@
{
"culture": "zh-Hans",
"texts": {
"MyAccount": "我的账户",
"SamplePageMessage": "Tests模块的示例页面"
}
}

7
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/Tests/zh-Hant.json

@ -1,7 +0,0 @@
{
"culture": "zh-Hant",
"texts": {
"MyAccount": "我的賬戶",
"SamplePageMessage": "Tests 模塊的示例頁面"
}
}

9
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/Localization/TestsResource.cs

@ -1,9 +0,0 @@
using Volo.Abp.Localization;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Localization;
[LocalizationResourceName("Tests")]
public class TestsResource
{
}

36
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/TestsDomainSharedModule.cs

@ -1,36 +0,0 @@
using Volo.Abp.Modularity;
using Volo.Abp.Localization;
using Lion.AbpPro.EntityFrameworkCore.Tests.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Validation;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
[DependsOn(
typeof(AbpValidationModule)
)]
public class TestsDomainSharedModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<TestsDomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<TestsResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/Tests");
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("Tests", typeof(TestsResource));
});
}
}

6
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared/TestsErrorCodes.cs

@ -1,6 +0,0 @@
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
public static class TestsErrorCodes
{
//Add your business exception error codes here...
}

69
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Blogs/Blogs.cs

@ -1,69 +0,0 @@
using Volo.Abp.Domain.Entities.Auditing;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
/// <summary>
/// 博客
/// </summary>
public class Blog : FullAuditedAggregateRoot<Guid>
{
private Blog()
{
Posts = new List<Post>();
}
public Blog(
Guid id,
string name,
string code
) : base(id)
{
SetName(name);
SetCode(code);
Posts = new List<Post>();
}
/// <summary>
/// 名称
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 编码
/// </summary>
public string Code { get; private set; }
/// <summary>
/// 文章 一对多
/// </summary>
public List<Post> Posts { get; private set; }
/// <summary>
/// 设置名称
/// </summary>
private void SetName(string name)
{
Name = name;
}
/// <summary>
/// 设置编码
/// </summary>
private void SetCode(string code)
{
Code = code;
}
/// <summary>
/// 更新博客
/// </summary>
public void Update(
string name,
string code
)
{
SetName(name);
SetCode(code);
}
}

65
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Blogs/Comment.cs

@ -1,65 +0,0 @@
using Volo.Abp.Domain.Entities.Auditing;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
/// <summary>
/// 评论
/// </summary>
public class Comment : FullAuditedEntity<Guid>
{
private Comment()
{
}
public Comment(
Guid id,
int? star,
Guid postId,
string content
) : base(id)
{
SetStar(star);
SetPostId(postId);
SetContent(content);
}
/// <summary>
/// 点赞
/// </summary>
public int? Star { get; private set; }
/// <summary>
/// 外键
/// </summary>
public Guid PostId { get; private set; }
/// <summary>
/// 内容
/// </summary>
public string Content { get; private set; }
/// <summary>
/// 设置点赞
/// </summary>
private void SetStar(int? star)
{
Star = star;
}
/// <summary>
/// 设置外键
/// </summary>
private void SetPostId(Guid postId)
{
PostId = postId;
}
/// <summary>
/// 设置内容
/// </summary>
private void SetContent(string content)
{
Content = content;
}
}

10
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Blogs/IBlogsRepository.cs

@ -1,10 +0,0 @@
using Volo.Abp.Domain.Repositories;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
public interface IBlogRepository : IBasicRepository<Blog, Guid>
{
Task<List<Blog>> GetListAsync(int maxResultCount = 10, int skipCount = 0);
Task<long> GetCountAsync();
}

57
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Blogs/Post.cs

@ -1,57 +0,0 @@
using Volo.Abp.Domain.Entities.Auditing;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
/// <summary>
/// 文章
/// </summary>
public class Post : FullAuditedEntity<Guid>
{
private Post()
{
Comments = new List<Comment>();
}
public Post(
Guid id,
Guid blogId,
string name
) : base(id)
{
SetBlogId(blogId);
SetName(name);
Comments = new List<Comment>();
}
/// <summary>
/// 外键
/// </summary>
public Guid BlogId { get; private set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; private set; }
/// <summary>
/// 评论 一对多
/// </summary>
public List<Comment> Comments { get; private set; }
/// <summary>
/// 设置外键
/// </summary>
private void SetBlogId(Guid blogId)
{
BlogId = blogId;
}
/// <summary>
/// 设置名称
/// </summary>
private void SetName(string name)
{
Name = name;
}
}

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.abppkg.json

@ -1,3 +0,0 @@
{
"role": "lib.domain"
}

16
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Lion.AbpPro.EntityFrameworkCore.Tests.Domain.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Lion.AbpPro.EntityFrameworkCore.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="7.2.2" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared\Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared.csproj" />
</ItemGroup>
</Project>

13
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Settings/TestsSettingDefinitionProvider.cs

@ -1,13 +0,0 @@
using Volo.Abp.Settings;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Settings;
public class TestsSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
/* Define module settings here.
* Use names from TestsSettings class.
*/
}
}

10
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/Settings/TestsSettings.cs

@ -1,10 +0,0 @@
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Settings;
public static class TestsSettings
{
public const string GroupName = "Tests";
/* Add constants for setting names. Example:
* public const string MySettingName = GroupName + ".MySettingName";
*/
}

10
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/TestsDbProperties.cs

@ -1,10 +0,0 @@
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
public static class TestsDbProperties
{
public static string DbTablePrefix { get; set; } = "Tests";
public static string? DbSchema { get; set; } = null;
public const string ConnectionStringName = "Tests";
}

13
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.Domain/TestsDomainModule.cs

@ -1,13 +0,0 @@
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
[DependsOn(
typeof(AbpDddDomainModule),
typeof(TestsDomainSharedModule)
)]
public class TestsDomainModule : AbpModule
{
}

19
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/Blogs/EfCoreBlogQueryableExtensions.cs

@ -1,19 +0,0 @@
using Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
using Microsoft.EntityFrameworkCore;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore.Blogs;
public static class EfCoreBlogQueryableExtensions
{
public static IQueryable<Blog> IncludeDetails(this IQueryable<Blog> queryable, bool include = true)
{
if (!include)
{
return queryable;
}
return queryable
.Include(e => e.Posts)
.ThenInclude(x => x.Comments);
}
}

36
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/Blogs/EfCoreBlogsRepository.cs

@ -1,36 +0,0 @@
using Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore.Blogs;
/// <summary>
/// 博客 仓储Ef core 实现
/// </summary>
public class EfCoreBlogRepository :
EfCoreRepository<TestsDbContext, Blog, Guid>,
IBlogRepository
{
public EfCoreBlogRepository(IDbContextProvider<TestsDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public async Task<List<Blog>> GetListAsync(int maxResultCount = 10, int skipCount = 0)
{
return await (await GetDbSetAsync())
.OrderByDescending(e => e.CreationTime)
.PageBy(skipCount, maxResultCount)
.ToListAsync();
}
public async Task<long> GetCountAsync()
{
return await (await GetDbSetAsync()).CountAsync();
}
public override async Task<IQueryable<Blog>> WithDetailsAsync()
{
return (await GetQueryableAsync()).IncludeDetails();
}
}

12
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/ITestsDbContext.cs

@ -1,12 +0,0 @@
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
[ConnectionStringName(TestsDbProperties.ConnectionStringName)]
public interface ITestsDbContext : IEfCoreDbContext
{
/* Add DbSet for each Aggregate Root here. Example:
* DbSet<Question> Questions { get; }
*/
}

29
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/TestsDbContext.cs

@ -1,29 +0,0 @@
using Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
[ConnectionStringName(TestsDbProperties.ConnectionStringName)]
public class TestsDbContext : AbpDbContext<TestsDbContext>, ITestsDbContext
{
/* Add DbSet for each Aggregate Root here. Example:
* public DbSet<Question> Questions { get; set; }
*/
public DbSet<Comment> Comments { get; set; }
public DbSet<Blog> Blogs { get; set; }
public DbSet<Post> Posts { get; set; }
public TestsDbContext(DbContextOptions<TestsDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.ConfigureTests();
}
}

38
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/TestsDbContextModelCreatingExtensions.cs

@ -1,38 +0,0 @@
using Lion.AbpPro.EntityFrameworkCore.Tests.Blogs;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
public static class TestsDbContextModelCreatingExtensions
{
public static void ConfigureTests(
this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
builder.Entity<Comment>(b =>
{
b.ToTable(nameof(Comment));
b.Property(e => e.Star).HasComment("点赞");
b.Property(e => e.Content).IsRequired().HasMaxLength(128).HasComment("内容");
b.Property(e => e.PostId).HasComment("外键");
b.ConfigureByConvention();
});
builder.Entity<Blog>(b =>
{
b.ToTable(nameof(Blog));
b.Property(e => e.Code).IsRequired().HasMaxLength(128).HasComment("编码");
b.Property(e => e.Name).IsRequired().HasMaxLength(128).HasComment("名称");
b.ConfigureByConvention();
});
builder.Entity<Post>(b =>
{
b.ToTable(nameof(Post));
b.Property(e => e.Name).IsRequired().HasMaxLength(128).HasComment("名称");
b.Property(e => e.BlogId).HasComment("外键");
b.ConfigureByConvention();
});
}
}

22
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/EntityFrameworkCore/TestsEntityFrameworkCoreModule.cs

@ -1,22 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
[DependsOn(
typeof(TestsDomainModule),
typeof(AbpEntityFrameworkCoreModule)
)]
public class TestsEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<TestsDbContext>(options =>
{
/* Add custom repositories here. Example:
* options.AddRepository<Question, EfCoreQuestionRepository>();
*/
});
}
}

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore.abppkg.json

@ -1,3 +0,0 @@
{
"role": "lib.ef"
}

16
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore/Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Lion.AbpPro.EntityFrameworkCore.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="7.2.2" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.Domain\Lion.AbpPro.EntityFrameworkCore.Tests.Domain.csproj" />
</ItemGroup>
</Project>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client.abppkg.json

@ -1,3 +0,0 @@
{
"role": "lib.http-api-client"
}

20
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client.csproj

@ -1,20 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Lion.AbpPro.EntityFrameworkCore.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="7.2.2" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts\Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="**\*generate-proxy.json" />
<Content Remove="**\*generate-proxy.json" />
</ItemGroup>
</Project>

26
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Client/TestsHttpApiClientModule.cs

@ -1,26 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
[DependsOn(
typeof(TestsApplicationContractsModule),
typeof(AbpHttpClientModule))]
public class TestsHttpApiClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
typeof(TestsApplicationContractsModule).Assembly,
TestsRemoteServiceConsts.RemoteServiceName
);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<TestsHttpApiClientModule>();
});
}
}

12
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Controllers/HomeController.cs

@ -1,12 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Controllers;
public class HomeController : AbpController
{
public ActionResult Index()
{
return Redirect("~/swagger");
}
}

18
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Dockerfile

@ -1,18 +0,0 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
WORKDIR /src
COPY . .
WORKDIR /src/templates/service/host/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host
RUN dotnet restore -nowarn:msb3202,nu1503
RUN dotnet build --no-restore -c Release -o /app
FROM build AS publish
RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host.dll"]

20
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/EntityFrameworkCore/TestsHttpApiHostMigrationsDbContext.cs

@ -1,20 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
public class TestsHttpApiHostMigrationsDbContext : AbpDbContext<TestsHttpApiHostMigrationsDbContext>
{
public TestsHttpApiHostMigrationsDbContext(DbContextOptions<TestsHttpApiHostMigrationsDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
}
}

27
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/EntityFrameworkCore/TestsHttpApiHostMigrationsDbContextFactory.cs

@ -1,27 +0,0 @@
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
public class TestsHttpApiHostMigrationsDbContextFactory : IDesignTimeDbContextFactory<TestsHttpApiHostMigrationsDbContext>
{
public TestsHttpApiHostMigrationsDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<TestsHttpApiHostMigrationsDbContext>()
.UseMySql(configuration.GetConnectionString("Tests"), MySqlServerVersion.LatestSupportedServerVersion);
return new TestsHttpApiHostMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}
}

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host.abppkg.json

@ -1,3 +0,0 @@
{
"role": "host.http-api"
}

44
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host.csproj

@ -1,44 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Lion.AbpPro.EntityFrameworkCore.Tests</RootNamespace>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>Lion.AbpPro.EntityFrameworkCore.Tests-c2d31439-b723-48e2-b061-5ebd7aeb6010</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="IdentityModel" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="7.2.2" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="7.2.2" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="7.2.2" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL" Version="7.2.2" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="7.2.2" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="7.2.2" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="7.2.2" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="7.2.2" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="7.2.2" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="7.2.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.Application\Lion.AbpPro.EntityFrameworkCore.Tests.Application.csproj" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore\Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi\Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.csproj" />
<ProjectReference Include="..\..\..\src\Lion.AbpPro.EntityFrameworkCore.Mysql\Lion.AbpPro.EntityFrameworkCore.Mysql.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

17
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Logs/logs.txt

@ -1,17 +0,0 @@
2023-06-19 17:39:32.267 +08:00 [INF] Starting web host.
2023-06-19 17:39:35.122 +08:00 [FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Lion.AbpPro.EntityFrameworkCore.Tests.TestsHttpApiHostModule, Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Extensions.DependencyInjection.AbpSwaggerGenServiceCollectionExtensions.AddAbpSwaggerGenWithOAuth(IServiceCollection services, String authority, Dictionary`2 scopes, Action`1 setupAction, String authorizationEndpoint, String tokenEndpoint)
at Lion.AbpPro.EntityFrameworkCore.Tests.TestsHttpApiHostModule.ConfigureServices(ServiceConfigurationContext context) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\frameworks\test\Lion.AbpPro.EntityFrameworkCore.Tests\Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host\TestsHttpApiHostModule.cs:line 80
at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
--- End of inner exception stack trace ---
at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
at Lion.AbpPro.EntityFrameworkCore.Tests.Program.Main(String[] args) in D:\github\WangJunZzz\abp-vnext-pro\aspnet-core\frameworks\test\Lion.AbpPro.EntityFrameworkCore.Tests\Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host\Program.cs:line 35
2023-06-19 17:54:04.532 +08:00 [INF] Starting web host.
2023-06-19 17:56:12.444 +08:00 [INF] Starting web host.
2023-06-19 18:00:24.441 +08:00 [INF] Starting web host.

28
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Migrations/20230619095614_Init.Designer.cs

@ -1,28 +0,0 @@
// <auto-generated />
using Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Migrations
{
[DbContext(typeof(TestsHttpApiHostMigrationsDbContext))]
[Migration("20230619095614_Init")]
partial class Init
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
#pragma warning restore 612, 618
}
}
}

23
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Migrations/20230619095614_Init.cs

@ -1,23 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Migrations
{
/// <inheritdoc />
public partial class Init : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}

25
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Migrations/TestsHttpApiHostMigrationsDbContextModelSnapshot.cs

@ -1,25 +0,0 @@
// <auto-generated />
using Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Migrations
{
[DbContext(typeof(TestsHttpApiHostMigrationsDbContext))]
partial class TestsHttpApiHostMigrationsDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql)
.HasAnnotation("ProductVersion", "7.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
#pragma warning restore 612, 618
}
}
}

56
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Program.cs

@ -1,56 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
public class Program
{
public async static Task<int> Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()
#else
.MinimumLevel.Information()
#endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateLogger();
try
{
Log.Information("Starting web host.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog();
await builder.AddApplicationAsync<TestsHttpApiHostModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
}

27
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/Properties/launchSettings.json

@ -1,27 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:44368",
"sslPort": 44368
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Lion.AbpPro.EntityFrameworkCore.Tests.DemoApp": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:44368",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

192
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/TestsHttpApiHostModule.cs

@ -1,192 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using IdentityModel;
using Lion.AbpPro.EntityFrameworkCore.Mysql;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Lion.AbpPro.EntityFrameworkCore.Tests.EntityFrameworkCore;
using StackExchange.Redis;
using Microsoft.OpenApi.Models;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.Caching;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.MySQL;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.Security.Claims;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.Swashbuckle;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.VirtualFileSystem;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
[DependsOn(
typeof(TestsApplicationModule),
typeof(TestsEntityFrameworkCoreModule),
typeof(TestsHttpApiModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpSwashbuckleModule),
typeof(LionAbpProEntityFrameworkCoreMysqlModule)
)]
public class TestsHttpApiHostModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
Configure<AbpDbContextOptions>(options => { options.UseMySQL(); });
// Configure<AbpMultiTenancyOptions>(options =>
// {
// options.IsEnabled = MultiTenancyConsts.IsEnabled;
// });
if (hostingEnvironment.IsDevelopment())
{
// Configure<AbpVirtualFileSystemOptions>(options =>
// {
// options.FileSets.ReplaceEmbeddedByPhysical<TestsDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Lion.AbpPro.EntityFrameworkCore.Tests.Domain.Shared", Path.DirectorySeparatorChar)));
// options.FileSets.ReplaceEmbeddedByPhysical<TestsDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Lion.AbpPro.EntityFrameworkCore.Tests.Domain", Path.DirectorySeparatorChar)));
// options.FileSets.ReplaceEmbeddedByPhysical<TestsApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts", Path.DirectorySeparatorChar)));
// options.FileSets.ReplaceEmbeddedByPhysical<TestsApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, string.Format("..{0}..{0}src{0}Lion.AbpPro.EntityFrameworkCore.Tests.Application", Path.DirectorySeparatorChar)));
// });
}
// context.Services.AddAbpSwaggerGenWithOAuth(
// configuration["AuthServer:Authority"],
// new Dictionary<string, string>
// {
// { "Tests", "Tests API" }
// },
// options =>
// {
// options.SwaggerDoc("v1", new OpenApiInfo { Title = "Tests API", Version = "v1" });
// options.DocInclusionPredicate((docName, description) => true);
// options.CustomSchemaIds(type => type.FullName);
// });
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية"));
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in"));
options.Languages.Add(new LanguageInfo("is", "is", "Icelandic", "is"));
options.Languages.Add(new LanguageInfo("it", "it", "Italiano", "it"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ro-RO", "ro-RO", "Română"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch"));
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
options.Languages.Add(new LanguageInfo("el", "el", "Ελληνικά"));
});
context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "Tests";
});
Configure<AbpDistributedCacheOptions>(options => { options.KeyPrefix = "Tests:"; });
var dataProtectionBuilder = context.Services.AddDataProtection().SetApplicationName("Tests");
if (!hostingEnvironment.IsDevelopment())
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
dataProtectionBuilder.PersistKeysToStackExchangeRedis(redis, "Tests-Protection-Keys");
}
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]?
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray() ?? Array.Empty<string>()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseMultiTenancy();
app.UseAbpRequestLocalization();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
var configuration = context.GetConfiguration();
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthScopes("Tests");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
}

12
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/appsettings.json

@ -1,12 +0,0 @@
{
"App": {
"CorsOrigins": "https://*.Tests.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
},
"ConnectionStrings": {
"Default": "Data Source=localhost;Port=3306;Database=LionAbpProDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true",
"Tests": "Data Source=localhost;Port=3306;Database=LionAbpProDBMysql;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
},
"Redis": {
"Configuration": "127.0.0.1"
}
}

2
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.Host/appsettings.secrets.json

@ -1,2 +0,0 @@
{
}

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

3
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.abppkg.json

@ -1,3 +0,0 @@
{
"role": "lib.http-api"
}

16
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Lion.AbpPro.EntityFrameworkCore.Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="7.2.2" />
<ProjectReference Include="..\Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts\Lion.AbpPro.EntityFrameworkCore.Tests.Application.Contracts.csproj" />
</ItemGroup>
</Project>

33
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/Samples/SampleController.cs

@ -1,33 +0,0 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
namespace Lion.AbpPro.EntityFrameworkCore.Tests.Samples;
[Area(TestsRemoteServiceConsts.ModuleName)]
[RemoteService(Name = TestsRemoteServiceConsts.RemoteServiceName)]
[Route("api/Tests/sample")]
public class SampleController : TestsController, ISampleAppService
{
private readonly ISampleAppService _sampleAppService;
public SampleController(ISampleAppService sampleAppService)
{
_sampleAppService = sampleAppService;
}
[HttpGet]
public async Task<SampleDto> GetAsync()
{
return await _sampleAppService.GetAsync();
}
[HttpGet]
[Route("authorized")]
[Authorize]
public async Task<SampleDto> GetAuthorizedAsync()
{
return await _sampleAppService.GetAsync();
}
}

12
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/TestsController.cs

@ -1,12 +0,0 @@
using Lion.AbpPro.EntityFrameworkCore.Tests.Localization;
using Volo.Abp.AspNetCore.Mvc;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
public abstract class TestsController : AbpControllerBase
{
protected TestsController()
{
LocalizationResource = typeof(TestsResource);
}
}

32
aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Tests/Lion.AbpPro.EntityFrameworkCore.Tests.HttpApi/TestsHttpApiModule.cs

@ -1,32 +0,0 @@
using Localization.Resources.AbpUi;
using Lion.AbpPro.EntityFrameworkCore.Tests.Localization;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Microsoft.Extensions.DependencyInjection;
namespace Lion.AbpPro.EntityFrameworkCore.Tests;
[DependsOn(
typeof(TestsApplicationContractsModule),
typeof(AbpAspNetCoreMvcModule))]
public class TestsHttpApiModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(TestsHttpApiModule).Assembly);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<TestsResource>()
.AddBaseTypes(typeof(AbpUiResource));
});
}
}
Loading…
Cancel
Save