Browse Source

通用代码GetAll

master
mahao 1 year ago
parent
commit
4dc27f27ae
  1. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs

12
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs

@ -64,6 +64,18 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
#endregion
#region CURD
/// <summary>
/// 获取全部实体列表
/// </summary>
/// <returns>实体DTO列表</returns>
[HttpGet]
public async Task<ListResultDto<CentralizedControlDto>> GetAllAsync()
{
var entities = await _repository.GetAllAsync(true);
var dtos = ObjectMapper.Map<List<CentralizedControl>, List<CentralizedControlDto>>(entities);
return new ListResultDto<CentralizedControlDto>(dtos);
}
/// <summary>
/// 获取列表
/// </summary>

Loading…
Cancel
Save