Add validators and services for Product Galleries and Product Tags
- Implemented Create, Delete, Get, and Update validators for Product Galleries. - Added Create, Delete, Get, and Update validators for Product Tags. - Created service classes for handling Discount Categories, Discount Orders, Discount Products, Discount Shopping Cart, Product Categories, Product Galleries, and Product Tags. - Each service class integrates with CQRS for command and query handling. - Established mapping profiles for Product Galleries.
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
using CMSMicroservice.Domain.Events;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace CMSMicroservice.Application.ProductGalleriesCQ.EventHandlers;
|
||||
|
||||
public class CreateNewProductGallerysEventHandler : INotificationHandler<CreateNewProductGallerysEvent>
|
||||
{
|
||||
private readonly ILogger<
|
||||
CreateNewProductGallerysEventHandler> _logger;
|
||||
|
||||
public CreateNewProductGallerysEventHandler(ILogger<CreateNewProductGallerysEventHandler> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public Task Handle(CreateNewProductGallerysEvent 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.ProductGalleriesCQ.EventHandlers;
|
||||
|
||||
public class DeleteProductGallerysEventHandler : INotificationHandler<DeleteProductGallerysEvent>
|
||||
{
|
||||
private readonly ILogger<
|
||||
DeleteProductGallerysEventHandler> _logger;
|
||||
|
||||
public DeleteProductGallerysEventHandler(ILogger<DeleteProductGallerysEventHandler> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public Task Handle(DeleteProductGallerysEvent 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.ProductGalleriesCQ.EventHandlers;
|
||||
|
||||
public class UpdateProductGallerysEventHandler : INotificationHandler<UpdateProductGallerysEvent>
|
||||
{
|
||||
private readonly ILogger<
|
||||
UpdateProductGallerysEventHandler> _logger;
|
||||
|
||||
public UpdateProductGallerysEventHandler(ILogger<UpdateProductGallerysEventHandler> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public Task Handle(UpdateProductGallerysEvent notification, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user