chore: add documentation comments and stylecop rules

This commit is contained in:
2025-12-04 11:25:01 +08:00
parent 17d143a351
commit 8e4c2b0e45
142 changed files with 1309 additions and 439 deletions

View File

@@ -17,7 +17,10 @@ public sealed class CreateRoleCommandHandler(
{
public async Task<RoleDto> Handle(CreateRoleCommand request, CancellationToken cancellationToken)
{
// 1. 获取租户上下文
var tenantId = tenantProvider.GetCurrentTenantId();
// 2. 构建角色实体
var role = new Role
{
TenantId = tenantId,
@@ -26,9 +29,11 @@ public sealed class CreateRoleCommandHandler(
Description = request.Description
};
// 3. 持久化
await roleRepository.AddAsync(role, cancellationToken);
await roleRepository.SaveChangesAsync(cancellationToken);
// 4. 返回 DTO
return new RoleDto
{
Id = role.Id,