sozsoft-platform/api/src/Sozsoft.Platform.Application/DeveloperKit/CustomComponentAppService.cs

30 lines
850 B
C#
Raw Normal View History

2026-02-24 20:44:16 +00:00
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Sozsoft.Platform.DeveloperKit;
using Sozsoft.Platform.Entities;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
namespace Platform.Api.Application;
public class CustomComponentAppService : CrudAppService<
CustomComponent,
CustomComponentDto,
Guid,
PagedAndSortedResultRequestDto,
CreateUpdateCustomComponentDto>, ICustomComponentAppService
{
public CustomComponentAppService(IRepository<CustomComponent, Guid> repository) : base(repository)
{
}
public async Task<List<CustomComponentDto>> GetActiveComponentsAsync()
{
var components = await Repository.GetListAsync(x => x.IsActive);
return await MapToGetListOutputDtosAsync(components);
}
}