- Remove IUnitOfWork pattern (not needed with auto-save repositories) - Add generic IRepository<T> with CreateAsync<TDto>, UpdateSingleAsync<TDto>, DeleteSingleAsync - Add UpdateAsync/DeleteAsync for bulk operations - Add ICommandPublisher interface for RabbitMQ integration - Add service interfaces: IEmailService, IPdfProcessingService, IDmsService, IEncryptionService, IEmailQueue - Configure Application DI with MediatR, AutoMapper, FluentValidation
20 lines
760 B
C#
20 lines
760 B
C#
using MediatR;
|
|
|
|
namespace DigitalData.EmailProfiler.Application.Common.Interfaces;
|
|
|
|
/// <summary>
|
|
/// Interface for publishing commands to a message broker (e.g., RabbitMQ)
|
|
/// </summary>
|
|
public interface ICommandPublisher
|
|
{
|
|
/// <summary>
|
|
/// Publishes a command to the message broker for asynchronous processing
|
|
/// </summary>
|
|
/// <typeparam name="TCommand">The command type (must implement IRequest)</typeparam>
|
|
/// <param name="command">The command to publish</param>
|
|
/// <param name="cancellationToken">Cancellation token</param>
|
|
/// <returns>Task representing the publish operation</returns>
|
|
Task PublishAsync<TCommand>(TCommand command, CancellationToken cancellationToken = default)
|
|
where TCommand : IRequest;
|
|
}
|