標籤:自動探索 frame tom targe ida config wrapper ext tps
原文串連:https://www.cnblogs.com/Qbit/p/andorid-netcore.html
轉載請註明出處
介紹
Orchard Core Modules庫提供了一種機制,可以擁有一個獨立的模組化系統,您可以選擇加入特定的應用程式架構,而不必依賴於您的應用程式設計。
原文[[The library Orchard Core Modules provides a mechanism to have a self-contained modular system where you can opt in to a specific application framework and not have the design of your application be dictated to by such.
]]...
快速入門
在Visual Studio中,建立一個新的Web應用程式。通過管理項目NuGet包將OrchardCore.Application.Cms.Targets安裝到項目中。接下來,在Startup.cs中,修改ConfigureServices方法,添加以下行:
services.AddOrchardCms();
接下來,在Configure方法的末尾,用這一行: app.UseOrchardCore();替換此塊: app.Run(async(context)=>{ await context.Response.WriteAsync(“Hello World!”);});
其他架構您可以輕鬆地將喜愛的應用程式架構添加到管道中。以下實現旨在並行工作,因此如果您想在管道中使用Asp.Net Mvc和Nancy,只需添加兩者即可。
下面的模組化架構套件裝器被設計為直接與模組化應用程式架構一起工作,因此避免添加原始架構並期望它可以工作。
原文[[The modular framework wrappers below are designed to work directly with the modular application framework, so avoid just adding the raw framework and expect it to just work.]]...Asp.Net Mvc
通過NuGet包管理器將OrchardCore.Application.Mvc.Targets 安裝到項目中
接下來,在Startup.cs中,將方法ConfigureServices修改為如下所示:
// Add ASP.NET MVC and support for modules services.AddOrchardCore() .AddMvc();
Note
注意添加 .AddMvc()
Asp.Net Mvc現在是您管道的一部分.
您可以在此處找到應用程式範例: OrchardCore.Mvc.Web
NancyFx
通過管理項目NuGet包將OrchardCore.Application.Nancy.Targets安裝到項目中
接下來,在Startup.cs中,將方法ConfigureServices修改為如下所示:
// Add Nancy and support for modules services .AddOrchardCore() .AddNancy() ;
Note
注意添加 .AddNancy()
NancyFx 現在是您管道的一部分。這意味著Nancy模組將被自動探索。
您可以在這裡找到一個應用程式範例: OrchardCore.Nancy.Web
原文串連:https://www.cnblogs.com/Qbit/p/andorid-netcore.html
轉載請註明出處
Orchard Core 文檔翻譯 (三) Orchard Core Modules