您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

WebhookDefinitionService.cs 718B

1234567891011121314151617181920212223
  1. using System.Diagnostics.CodeAnalysis;
  2. namespace Diligent.WebAPI.Business.Services
  3. {
  4. [ExcludeFromCodeCoverage]
  5. public class WebhookDefinitionService : IWebhookDefinitionService
  6. {
  7. private readonly DatabaseContext _context;
  8. private readonly IMapper _mapper;
  9. public WebhookDefinitionService(DatabaseContext context, IMapper mapper)
  10. {
  11. _context = context;
  12. _mapper = mapper;
  13. }
  14. public async Task<List<WebhookDefinitionViewDto>> GetAll()
  15. {
  16. var webhookDefinitions = await _context.WebhookDefinitions.ToListAsync();
  17. return _mapper.Map<List<WebhookDefinitionViewDto>>(webhookDefinitions);
  18. }
  19. }
  20. }