剃刀类库来自外部类库的脚手架视图

时间:2018-08-16 19:29:52

标签: razor asp.net-core portable-class-library scaffolding

我有一个asp.net核心类库program Girli_str_2xFree_Minimized; {$APPTYPE CONSOLE} // initial mini-demo by Ãèðëèîíàéëüäî - http://www.sql.ru/forum/memberinfo.aspx?mid=249076 // variance IfDef's re-added by Arioch (orginal reporter) uses   SysUtils; {.$Define TestBug_Impl_Exit} {.$Define TestBug_Impl_AsIs} {.$Define NewStr_Unique} var   rFile: string; // global or local does not matter. // originally it was an object member. {$IfNDef TestBug_Impl_Exit} {$IfNDef TestBug_Impl_AsIs} function TestBUG(const S: string): string; begin   Result := S; end; {$EndIf}{$EndIf} {$IfDef TestBug_Impl_AsIs} procedure TestBUG(const S: string; var Result: string); begin   Result := S; end; {$EndIf} {$IfDef TestBug_Impl_Exit} function TestBUG(const S: string): string; begin   Exit(S); end; {$EndIf} procedure Test(const FileName: string); {$IfDef TestBug_Impl_AsIs} var unnamed_temp: string; {$EndIf} begin // rFile := FileName.SubString(0, Length(FileName)); // unavail in XE2 {$IfNDef NewStr_Unique}   rFile := Copy(FileName, 1, Length(FileName));   // reference-counting broken, de facto writes into const-string (destroys it) {$Else}   rFile := FileName; // no bug, reference-counting proceeded normally!   UniqueString(rFile); {$EndIf} {$IfNDef TestBug_Impl_AsIs}   TestBUG(FileName); // try to use the const-pointer to the old string {$Else}   TestBUG(FileName, unnamed_temp); {$EndIf} end; // <== Fatality here begin   try     try       rFile := ParamStr(0);       Test(rFile);       Writeln('Safely returned from the hazardous function without memory dislocations.');     except       on E: Exception do         Writeln(E.ClassName, ': ', E.Message);     end;   finally     Writeln;     Writeln('Read the output. Press ENTER to terminate the program.');     Readln;   end; end. ,具有所有EF代码优先模型。理想情况下,我想拥有一个可以处理所有视图的剃须刀类库project.models

我可以从外部EF类库中提取RCL中的视图吗?

或者也许更好的问题是...

有没有办法从剃刀类库中的模型中支撑剃刀页面?我在RCL中没有上下文菜单选项“ New Scaffolding Item ...”

0 个答案:

没有答案