EventConsumer and appliaction staratup

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 лет назад
Is there in NopCommerce EventConsumer class that "triggers" on the application startup? I want to use it in a plugin.
7 лет назад
Inherit from IStartupTask.  See how Froogle plugin does it:

    public class EfStartUpTask : IStartupTask
    {
        public void Execute()
        {
            ...
        }
7 лет назад
Is it possible to use the ProductService inside of the Execute method?

When I try:


var productService = EngineContext.Current.Resolve<IProductService>();
var products = productService.SearchProducts();


Exception "Request is not available in this context" is thrown.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.