LightSpeed将动态模型投射到强类型的Razor模板中

时间:2013-12-23 14:16:49

标签: c# razor lightspeed

我需要一些帮助,使用LightSpeed在模板中投射模型。

当我使用Entity Framework时,一切都很好,但是对于LS,我可以说:

@inherits NancyRazorViewBase<dynamic>
@var Projects = Model.Projects // It's a collection of Project Enitities 
@foreach(MyAssemblyNamespace.Models.Project project in Projects) {
    // ...
}

因为我会收到错误:

[CS0012] Line: 18 Column: 10 - The type 'Mindscape.LightSpeed.Entity`1' is defined 
in an assembly that is not referenced. You must add a reference to assembly 
'Mindscape.LightSpeed, Version=5.0.2597.0, Culture=neutral, 
PublicKeyToken=360c8f37b466ebb2'. (show)

0 个答案:

没有答案