Rider中的脚手架控制器

编程入门 行业动态 更新时间:2024-10-22 17:29:41
本文介绍了Rider中的脚手架控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试从VS 2017迁移到Rider ... IDE非常吸引人!

I'm trying to move from VS 2017 into Rider... the IDE is very appealing!

不使用命令行,有没有一种方法可以通过从上下文菜单中添加控制器的时髦方式来搭建控制器,如下所示:

WITHOUT using the command line, is there a way to scaffold a controller in the fashionable way of adding a controller from the context menu, as in here:

推荐答案

不,您没有像VisualStudio那样从类或视图模型中搭建控制器的选项,但是仍然可以右键单击来创建控制器.

No, you do not have the options to scaffold a controller from a class or viewmodel as in VisualStudio, but you still can create a controller with a right click.

尽管它不如Visual Studio时髦,但您可以通过非常类似的方式添加Controller:

Althought it is not as fashionable as VisualStudio, you can add a Controller in a very similar way:

  • 右键单击Controller文件夹.
  • 在上下文菜单中,选择新建"->控制器".
  • Rider将为您创建一个简单的Controller结构,如下所示:

    Rider will create a simple Controller structure for you like this:

    using System.Web.Mvc; namespace ASPNETMVCApplication.Areas.Admin.Controllers { public class Controller1 : Controller { // GET public ActionResult Index() { return View(); } } }

    然后,您可以在View()上 Alt + Enter 并创建一个视图.

    Then you can Alt+Enter over the View() and create a view.

    但是在这种情况下,它离VisualStudio提供的选项还很远.

    But it is still far away from the options VisualStudio offers in this situation.

    车手版本:骑士2017.1.1Build#RD-171.4456.2813,建于2017年8月22日

    Rider version: Rider 2017.1.1 Build #RD-171.4456.2813, built on August 22, 2017

    更多推荐

    Rider中的脚手架控制器

    本文发布于:2023-11-17 00:02:53,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1608060.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:脚手架   控制器   Rider

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!