i write a plugin, i can't build the project because that one is not exist. Maybe that method with mvc 5 or nop 3.x. Everybody know that problems, Please tell me if you fixed.
RegisterPluginDataContext is an extension method. Just ensure that "using Nop.Web.Framework.Mvc" is added to your DependencyRegistrar
If i remove RegisterPluginDataContext method, my object_context doesn't work when i install the plugin. That mean, i can't access data with that object_context, the database don't generate table. I tried to apply normal code first, then POCO is generated in the database and i can get data from the way, only time. However, i uninstall plugin and delete the table by hand. After that, i re-install the plugin, The system notify that my object context have problems. I think the problem is mapping, when i uninstall plugin, i must remove mapping but i don't want to intervene available system .
I dont know about 2.8 or other versions but at 4.0 I got around this problem by checking the code at Shipping by Weight plugin.
Their using contains the following
using Autofac; using Autofac.Core; using Nop.Core.Configuration; using Nop.Core.Data; using Nop.Core.Infrastructure; using Nop.Core.Infrastructure.DependencyManagement; using Nop.Data; using Nop.Plugin.Shipping.FixedOrByWeight.Data; using Nop.Plugin.Shipping.FixedOrByWeight.Domain; using Nop.Plugin.Shipping.FixedOrByWeight.Services; using Nop.Web.Framework.Infrastructure;
The doc just cant catch up with the code updates.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Vous avez encore des questions ou avez besoin d'aide?