{"id":13432250,"url":"https://github.com/OrchardCMS/OrchardCore.Samples","last_synced_at":"2025-03-16T23:30:59.882Z","repository":{"id":38361917,"uuid":"98916146","full_name":"OrchardCMS/OrchardCore.Samples","owner":"OrchardCMS","description":"Modules and Multi-Tenancy in ASP.NET samples using the Orchard Core framework","archived":false,"fork":false,"pushed_at":"2025-02-23T19:21:51.000Z","size":1039,"stargazers_count":395,"open_issues_count":11,"forks_count":133,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-03-10T18:18:10.177Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OrchardCMS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-31T18:11:53.000Z","updated_at":"2025-02-23T19:21:55.000Z","dependencies_parsed_at":"2023-10-14T22:30:59.115Z","dependency_job_id":"29fb9adc-519a-409f-85d1-eaa7eb077929","html_url":"https://github.com/OrchardCMS/OrchardCore.Samples","commit_stats":{"total_commits":41,"total_committers":7,"mean_commits":5.857142857142857,"dds":0.5853658536585367,"last_synced_commit":"10e7d54ff2613b513ea012ae13c64217dc5867a4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrchardCMS%2FOrchardCore.Samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrchardCMS%2FOrchardCore.Samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrchardCMS%2FOrchardCore.Samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OrchardCMS%2FOrchardCore.Samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OrchardCMS","download_url":"https://codeload.github.com/OrchardCMS/OrchardCore.Samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243949866,"owners_count":20373653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T02:01:09.736Z","updated_at":"2025-03-16T23:30:59.181Z","avatar_url":"https://github.com/OrchardCMS.png","language":"C#","funding_links":[],"categories":["Sample Projects","例子"],"sub_categories":["Workflow","工作流"],"readme":"# Orchard Core Framework Samples\n\nSample web applications demonstrating how to build a Modular and Multi-Tenant ASP.NET Core application using the Orchard Core Framework.\n\nYou can watch a video providing a step by step demonstration of building a modular, multi-tenant Orchard Core Framework application here https://www.youtube.com/watch?v=yrQaKv2mxFU\u0026list=PLReL099Y5nRd04p81Q7p5TtyjCrj9tz1t. It was presented at .NET Conf 2019 using Orchard Core RC1. The names of the C# projects in the demo do not match these sample projects, but the demonstration is very similar to these samples.\n\n## Contents of the Solution\n\n### MultiTenantApplication\n\nAn ASP.NET Core MVC application that references the modules projects, and provides two tenants with different modules enabled.\n\nThe homepage of this web application provides more information, and links to the two tenants and module endpoints. The tenants and their features are configured in the \"OrchardCore\" section of the appsettings.json file.\n\n### ModularApplication\n\nA simple ASP.NET Core application that references the modules.\n\n### DashboardApplication\n\nAn ASP.NET Core MVC application with Orchard Admin UI that references the modules projects.\n\nThe application has minimal features and dependencies. There are users, roles and features management in admin UI. The sample contains a customizable minimal setup recipe.\n\n### Module1\n\nA sample module containing ASP.NET Core MVC controllers, views, and pages.\n\n### Module2\n\nA sample module that registers custom middleware.\n\n## Running\n\n### From Visual Studio 2022\n\nOpen the `OrchardCore.Samples.sln` solution file and run either application and visit its homepage (any project with a name ending in \"Application\"). \n\nOpen the website in your browser, and use the URLs or links it provides to explore.\n\n### From the Command Line\n\nOpen either Web application folder, `ModularApplication` or `MultiTenantApplication`, then run these commands:\n\n- `dotnet restore`\n- `dotnet build`\n- `dotnet run`\n\n### Multi-Tenant\n\nThe non-default tenants are prefixed with `/customer-a` and `/customer-b`.\nFor instance, accessing `/customer-b/Module2/hello` will invoke the middleware defined in **Module2**.\n\nThe tenants can be modified by editing the \"OrchardCore\" section of the appsettings.json file and restarting the application.\n\nNote that tenants.json is no longer supported in Orchard Core Framework applications, and tenant information is read from the \"OrchardCore\" section provided by any of the configuration providers.\nIn the MultiTenantApplication sample, the appsettings.json is used to configure the \"OrchardCore\" section.\n\n## Creating new Modules\n\nModules can be .NET Standard 2.0 class libraries or .NET Core 3.0 class libraries that reference the **OrchardCore.Module.Targets** Nuget Package.\n\nIf you need it, development Orchard Core Nuget packages are available in a MyGet feed at this url: `https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json`\n\nOptionally, modules can be packaged as Nuget packages and made available on Nuget or MyGet, including static files and views.\nThe Orchard Core CMS builds upon the Orchard Core Framework.\nMore examples of modules can be found for the Orchard Core CMS in this repository: https://github.com/OrchardCMS/OrchardCore\n\n## Creating New Modular or Multi-Tenant Applications\n\nA modular application that hosts module only needs to reference one of these targets packages:\n\n- **OrchardCore.Application.Targets**: Allows the application to reference and import modules, and optionally use multi-tenancy.\n- **OrchardCore.Application.Mvc.Targets**: Same as **OrchardCore.Application.Targets** but also references the **OrchardCore.Mvc** module\n- **OrchardCore.Application.Nancy.Targets**: Same as **OrchardCore.Application.Targets** but also references the **OrchardCore.Nancy** module\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOrchardCMS%2FOrchardCore.Samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FOrchardCMS%2FOrchardCore.Samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FOrchardCMS%2FOrchardCore.Samples/lists"}