[英]Which project should I add .Net Core Identity (Web API or in Web Client)?
I have created 2 separate projects a Web API and MVC as a Web Client.我创建了 2 个单独的项目,一个 Web API 和 MVC 作为 Web 客户端。 I wanted to add an external login for my web client, and now I'm confused on which project I should put the Identity stores.
我想为我的 web 客户端添加一个外部登录,现在我对应该放置身份存储的项目感到困惑。
By the way I am using.Net Core 3.1 with VS Code as my editor.顺便说一句,我使用 .Net Core 3.1 和 VS Code 作为我的编辑器。
This question is not complete (there is not enough information on how You going to use API).这个问题不完整(关于您将如何使用 API 的信息不足)。
In most cases, the.Net Core Identity system should be used in an API , since often APIs contain the main logic of the application being implemented, and clients are just interaction interfaces (of which there can be several , for example, a mobile application and a web interface).在大多数情况下,应该在 API 中使用 .Net Core Identity 系统,因为 API 通常包含正在实现的应用程序的主要逻辑,而客户端只是交互接口(其中可以有多个,例如,移动应用程序和一个 web 接口)。
You also mentioned that You are using VS Code as code editor.您还提到您正在使用 VS Code 作为代码编辑器。 It doesn't have built-in code generation capabilities like VS does, but you can still use dotnet CLI codegenerators (eg ASP Identity scaffolding ).
它没有像 VS 那样的内置代码生成功能,但您仍然可以使用dotnet CLI代码生成器(例如ASP Identity 脚手架)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.