我正在使用asp.net mvc 5.我正在做以下教程, http://venkatbaggu.com/signalr-database-update-notifications-asp-net-mvc-usiing-sql-dependency/
但是在Global.sax文件中它说"WebApiConfig在当前上下文中不存在".为什么?
这里有一些代码
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
GlobalConfiguration.Configure(WebApiConfig.Register); //this is where error shows
//Start SqlDependency with application initialization
SqlDependency.Start(connString);
}
Run Code Online (Sandbox Code Playgroud) 我需要将视图数据(整数)传递给另一个控制器.
这就是我的尝试;
@Html.ActionLink("Get Location", "Index", "Map", new { Id=@item.Id},null)
Run Code Online (Sandbox Code Playgroud)
我需要将此信息传递给"Map"Controller的Index动作方法;
public ActionResult Index(int? i)
{
var Id = from o in db.Objects where o.Id == i select o;
return View(Id);
}
Run Code Online (Sandbox Code Playgroud)
但是参数没有得到传递......这是传递参数的方法吗?当我把断点我发现那个int?我是空的..为什么?
我在我的ubuntu上安装了nodejs和npm.然后我在我的机器上安装了ember并输入ember -v以验证ember是否已成功安装.但我从终端收到以下消息:
/usr/bin/env: node: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我意外地安装了节点(而不是nodejs),但后来我删除了...现在当我输入node终端时,它给了我:
The program 'node' can be found in the following packages:
* node
* nodejs-legacy
Try: apt-get install <selected package>
Run Code Online (Sandbox Code Playgroud)
我需要做什么来正确安装余烬?