LightSpeed cast a dynamic model to strong typed inside Razor template

152 views Asked by At

I need some help with casting model in template with LightSpeed.

When I used Entity Framework everything was ok, but with LS i can say just:

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

Because I'll receive error:

[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

There are 0 answers