update
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
using CMSMicroservice.Domain.Events;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CMSMicroservice.Application.CategoryCQ.EventHandlers;
|
||||
|
||||
public class CreateNewCategoryEventHandler : INotificationHandler<CreateNewCategoryEvent>
|
||||
{
|
||||
private readonly ILogger<CreateNewCategoryEventHandler> _logger;
|
||||
|
||||
public CreateNewCategoryEventHandler(ILogger<CreateNewCategoryEventHandler> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public Task Handle(CreateNewCategoryEvent notification, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
using CMSMicroservice.Domain.Events;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CMSMicroservice.Application.CategoryCQ.EventHandlers;
|
||||
|
||||
public class DeleteCategoryEventHandler : INotificationHandler<DeleteCategoryEvent>
|
||||
{
|
||||
private readonly ILogger<DeleteCategoryEventHandler> _logger;
|
||||
|
||||
public DeleteCategoryEventHandler(ILogger<DeleteCategoryEventHandler> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public Task Handle(DeleteCategoryEvent notification, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
using CMSMicroservice.Domain.Events;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CMSMicroservice.Application.CategoryCQ.EventHandlers;
|
||||
|
||||
public class UpdateCategoryEventHandler : INotificationHandler<UpdateCategoryEvent>
|
||||
{
|
||||
private readonly ILogger<UpdateCategoryEventHandler> _logger;
|
||||
|
||||
public UpdateCategoryEventHandler(ILogger<UpdateCategoryEventHandler> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public Task Handle(UpdateCategoryEvent notification, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user