Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
using Grand.Domain;
using Grand.Infrastructure.Events;
using Grand.Mediator;
namespace Grand.Infrastructure.Extensions;
public static class EventPublisherExtensions
{
public static async Task EntityInserted<T>(this IMediator eventPublisher, T entity) where T : ParentEntity
{
await eventPublisher.Publish(new EntityInserted<T>(entity));
}
public static async Task EntityUpdated<T>(this IMediator eventPublisher, T entity) where T : ParentEntity
{
await eventPublisher.Publish(new EntityUpdated<T>(entity));
}
public static async Task EntityDeleted<T>(this IMediator eventPublisher, T entity) where T : ParentEntity
{
await eventPublisher.Publish(new EntityDeleted<T>(entity));
}
}