0
我为this wonderful guide创建了Orchard自定义模块。Orchard自定义模块显示空白“创建”页面
我创建了一个名为BarberAdminController控制器如下:
[Admin]
public class BarberAdminController : Controller
{
...
public BarberAdminController(IOrchardServices services, IRepository<BarberPart> repository)
{
_repository = repository;
_services = services;
}
...
public ActionResult Create()
{
var barber = _services.ContentManager.New(typeof(BarberPart).ToString());
dynamic model = _services.ContentManager.BuildEditor(barber);
return View(model);
}
}
查看:
@{ Layout.Title = T("New Barber").ToString(); }
@using (Html.BeginFormAntiForgeryPost()) {
@Html.ValidationSummary()
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
@Display(Model)
}
一旦点击从管理菜单中的链接,创建一个理发师,我得到什么也没有一个空白页但一个“保存”按钮。 (URL:/ Admin/BarberShop/Barbers/Create)
有谁知道我可能会做错什么?
我已经设置了路线和管理链接,他们似乎工作正常。我尽可能按照我的指导正确创建了BarberPart的驱动程序和处理程序。包括下载到Migration.cs文件数据库模式。
任何帮助将是伟大的!
缺少位置可能? – 2012-03-31 07:23:05