【问题标题】:ASP.NET Zero + ASP.NET Boilerplate template folder hierarchy/usageASP.NET 零 + ASP.NET Boilerplate 模板文件夹层次结构/用法
【发布时间】:2018-10-03 17:02:52
【问题描述】:

我正在寻找模板文件夹结构的解释。 如果有人能指点我一些文档,那就太棒了——我看过但找不到。

src/AppName.Application
src/AppName.Application.Client
src/AppName.Application.Shared
src/AppName.Core
src/AppName.Core.Shared
src/AppName.EntityFrameworkCore
src/AppName.Migrator .            # My understanding is that this if for performing database migrations
src/AppName.Mobile.Droid .        # This obviously hosts Android Mobile Code
src/AppName.Mobile.iOS .          # This obviously hosts iOS Mobile Code
src/AppName.Mobile.Shared         # This obviously hosts Shared Mobile Code
src/AppName.Web.Core              
src/AppName.Web.Host              
src/AppName.Web.Mvc               # This obviously is where the Mvc code goes
src/AppName.Web.Public            # Should this have all static css/js type files?

基本上,我不知道各个部分应该包含什么。任何帮助都会很有用。

谢谢。

【问题讨论】:

    标签: asp.net-core aspnetboilerplate


    【解决方案1】:

    Aspnetboilerplate 试图分离所有内容

    考虑这个网址NLayered Architecture

    • src/AppName.Application ----> Api - 代码,对外可用,由appname.web.host使用swagger自动构建
    • src/AppName.Application.Client ----> 为您的移动应用实现 api 的客户端。
    • src/AppName.Application.Shared ---->所有接口和dto都在这里定义。
    • src/AppName.Core ---->您的业务类(或类模型),包括域管理器
    • src/AppName.Core.Shared ---->所有定义域管理器的接口
    • src/AppName.EntityFrameworkCore ----> ORM
    • src/AppName.Migrator ----> 用于在所有租户数据库上迁移数据库调整的控制台应用程序。
    • src/AppName.Mobile.Droid 。
    • src/AppName.Mobile.iOS 。
    • src/AppName.Mobile.Shared
    • src/AppName.Web.Core ---->你选择了.net core,因此你可以通过这个项目在没有iis的情况下进行部署
    • src/AppName.Web.Host ----> api 基于 appname.application 构建
    • src/AppName.Web.Mvc ---->您的前端应用程序
    • src/AppName.Web.Public ----> 只是在注册之前为您的产品做广告的第二个应用程序。

    【讨论】:

    • 感谢您提供的非常有帮助的答案,如果在没有 IIS 的情况下进行部署,您是否必须通过 src/AppName.Web.Core 执行此操作?目前我们仅发布 Mvc 应用程序(不使用 IIS),我不确定这样做的含义 - 任何链接等都会非常有帮助!再次感谢。
    • IIs 是一个应用程序(或 Web)服务器,它增加了很多好处,比如路由和其他东西。如果您在没有 iis 的情况下执行此操作,那么我假设您使用的是 kestrel。这是.net核心的标准。最好对红隼做一些研究。我对此的了解非常有限。
    猜你喜欢
    • 2023-03-10
    • 1970-01-01
    • 2018-09-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多