简体   繁体   English

包含controller和model源代码Razor Class库

[英]Include controller and model source code of Razor Class Library

Is it possible to view and include the source code for the controller and models of the Identity package in Asp.Net Core 3 into my VS project?是否可以在 Asp.Net Core 3 中查看 controller 和 Identity package 的源代码并将其包含到我的 VS 项目中?

I have scaffolded the package but it currently shows only the view files.我已经搭建了 package 的脚手架,但它目前只显示视图文件。

There is no controller or model code.没有 controller 或 model 代码。 The Identity default UI uses Razor Pages. Identity 默认 UI 使用 Razor 页面。 With Razor Pages, there's a code-behind (.cshtml.cs), which has methods similar to controller actions, called handlers, and the model is actually a PageModel and is the entire backing class for the view. With Razor Pages, there's a code-behind (.cshtml.cs), which has methods similar to controller actions, called handlers, and the model is actually a PageModel and is the entire backing class for the view.

The views should have a little arrow to the left of them, which you can expand to show the code-behind.视图的左侧应该有一个小箭头,您可以将其展开以显示代码隐藏。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM