Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/314.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# LightSpeed将动态模型强制转换为强类型的内部Razor模板_C#_Razor_Lightspeed - Fatal编程技术网

C# LightSpeed将动态模型强制转换为强类型的内部Razor模板

C# LightSpeed将动态模型强制转换为强类型的内部Razor模板,c#,razor,lightspeed,C#,Razor,Lightspeed,我需要一些帮助,用LightSpeed在模板中铸造模型 当我使用实体框架时,一切都正常,但对于LS,我可以说: @inherits NancyRazorViewBase<dynamic> @var Projects = Model.Projects // It's a collection of Project Enitities @foreach(MyAssemblyNamespace.Models.Project project in Projects) { // ..

我需要一些帮助,用LightSpeed在模板中铸造模型

当我使用实体框架时,一切都正常,但对于LS,我可以说:

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

您添加了对此程序集的引用了吗?在Web.config中:在Visual Studio gui中我也有一个
[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)