[英]Error: The method or operation is not implemented. while scaffolding MYSQL Database
[英]What is the error “The method or operation is not implemented.” in nopCommerce plugin during installing a new plugin
我正在研究nopCommerce CMS。 我創建了自己的插件,並希望通過管理面板安裝它。 我成功創建了插件,並在“本地插件”部分的管理面板中顯示。 當我嘗試安裝它時,我收到錯誤“方法或操作未實現。”。 任何人都可以告訴我我錯過了什么。
請找到我編寫安裝的以下代碼:
private readonly ISettingService _settingService;
public AdminInvoicePlugin(ISettingService settingService)
{
this._settingService = settingService;
}
public void GetConfigurationRoute(out string actionName, out string controllerName, out System.Web.Routing.RouteValueDictionary routeValues)
{
actionName = "Configure";
controllerName = "InvoiceAdmin";
routeValues = new RouteValueDictionary { { "Namespaces", "Shopfast.Plugin.Invoice.Admin.Controllers" }, { "area", null } };
}
void IPlugin.Install()
{
base.Install();
}
PluginDescriptor IPlugin.PluginDescriptor
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
void IPlugin.Uninstall()
{
base.Uninstall();
}
請記住,如果服務器進程當時仍在運行,則在部署后不會立即刷新NopCommerce插件代碼。 它通常需要從Configuration-> Plugins頁面重新啟動應用程序(后端,右上角)和/或“重新加載插件列表”操作。
刪除throw NotImplementedException
部分后,您很可能仍然遇到錯誤消息,因為代碼未在內存中更新。
我更改了以下代碼:
PluginDescriptor IPlugin.PluginDescriptor
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
這段代碼:
PluginDescriptor IPlugin.PluginDescriptor
{
get;
set;
}
問題解決了。 我現在沒有收到錯誤。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.