在ASP.NET Core 6中添加部分(Razor)视图,并在Visual Studio中使用模型

发布于 2025-02-06 22:56:33 字数 499 浏览 1 评论 0原文

我(新的C#)正在为ASP.NET Core 6 Web应用程序(W/ MVC)进行一个教程,并到达了一个关键时刻,我正在尝试在其中添加新的剃须刀视图(称为“ _customerDetails”) “客户”模型。领导教程的人表明我应该选择一个“空”(“脚手架”?)模板,这是他在下拉下的选项,如下所示:

​对我来说并没有出现!我只有创建,删除,详细信息,编辑,空(无模型)和列表,如您所见:

“

有人知道这是否是.net的新版本吗?还是VS 2022的事情?该教程在6.0/-2022版本中涵盖。也许我可以使用“空(无模型)”模板,然后修改以获得相同的效果?

I (new to C#) am working on a tutorial for a ASP.NET Core 6 Web App (w/ MVC), and have reached a juncture where I'm trying to Add a new Razor View (called "_CustomerDetails") to my "Customer" model. The person leading the tutorial has indicated that I should select an "Empty" ("scaffolding"?) Template, which appears as an option for him in HIS drop-down, as seen here:

scaffolding_templates

...but it does not appear that way for me! I only have Create, Delete, Details, Edit, Empty (without model), and List, as you see here:

add-razor-partial-view

Anyone know if this is a new version of .NET thing? Or a VS 2022 thing? The tutorial is being covered in a pre-6.0/-2022 version. Maybe I can use an "Empty(without model)" template and then modify to get the same effect?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文