简体   繁体   English

我应该添加哪个项目.Net Core Identity(Web API 或 Web 客户端)?

[英]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.

相关问题 .NET 核心 Web API 身份验证和 .NET 身份 - .NET Core Web API Authentication and .NET Identity ASP.NET核心web API项目中如何添加使用DBContecxt的后台服务 - How to add background service which uses DBContecxt in ASP.NET core web API project How to add .net core Web API project to an existing .NET core (3.1) Web Application project? - How to add .net core Web API project to an existing .NET core (3.1) Web Application project? Web API 中的 ASP.NET 核心标识 - ASP.NET Core Identity in a Web API 如何在Net Core Web API中扩展身份 - How to extend Identity in Net Core Web API Blazor 和 Web API 解决方案中的 .NET 核心标识 - .NET Core Identity in Blazor and Web API Solution 如何将 Angular 项目添加到现有 .NET 核心 Web ZDB974238714CA8DE634A7CE1D08 项目? - How do I add an Angular project to an exisiting .NET Core Web API project? ASP.Net Web API与WCF,我应该在我的项目中选择哪一个 - ASP.Net Web API vs WCF, which one should I choose in my project 将Google身份验证添加到**现有** .net核心2 web api项目 - add google authentication to **Existing** .net core 2 web api project OR/M 在 .NET Core Web API 项目中可用吗? - Is OR/M available in .NET core web API project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM