工具生成版本

This commit is contained in:
ShaoHua
2025-12-29 00:41:26 +08:00
commit e2fc6b5d61
244 changed files with 20445 additions and 0 deletions
@@ -0,0 +1,38 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
using Volo.Abp.Account;
namespace Hua.Abp.Demo.HttpApi.Client.ConsoleTestApp;
public class ClientDemoService : ITransientDependency
{
private readonly IProfileAppService _profileAppService;
private readonly IIdentityUserAppService _identityUserAppService;
public ClientDemoService(
IProfileAppService profileAppService,
IIdentityUserAppService identityUserAppService)
{
_profileAppService = profileAppService;
_identityUserAppService = identityUserAppService;
}
public async Task RunAsync()
{
var profileDto = await _profileAppService.GetAsync();
Console.WriteLine($"UserName : {profileDto.UserName}");
Console.WriteLine($"Email : {profileDto.Email}");
Console.WriteLine($"Name : {profileDto.Name}");
Console.WriteLine($"Surname : {profileDto.Surname}");
Console.WriteLine();
var resultDto = await _identityUserAppService.GetListAsync(new GetIdentityUsersInput());
Console.WriteLine($"Total users: {resultDto.TotalCount}");
foreach (var identityUserDto in resultDto.Items)
{
Console.WriteLine($"- [{identityUserDto.Id}] {identityUserDto.Name}");
}
}
}