Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
583 views
in Technique[技术] by (71.8m points)

asp.net-mvc - 如何在另一个(非ASP)项目中运行asp.net核心MVC视图?(How to run asp.net core MVC views inside another (non-asp) project?)

I have an asp.net core MVC project with several views (typical render is layout + view + few partials).

(我有一个带有几个视图的asp.net核心MVC项目(典型的渲染是布局+视图+几个局部)。)

I'd like to switch some of the workload to Azure Functions, but continue using the same views to avoid double maintenance.

(我想将一些工作负载切换到Azure Functions,但是继续使用相同的视图以避免重复维护。)

I've looked at alternative razor engines (RazorEngine, RazorLight), but, AFAIU, they have a stiff view compilation cost on startup, which is bad for Azure Functions.

(我已经看过其他剃刀引擎(RazorEngine,RazorLight),但是AFAIU在启动时它们的视图编译成本很高,这对Azure Functions不利。)

I'm looking for a way to reuse the compiled views from MVC - either get to their compiled C# form or invoke them directly from DLL.

(我正在寻找一种重用MVC中已编译视图的方法-获取其已编译C#表单或直接从DLL调用它们。)

  ask by Ivan Koshelev translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...