如何将ASP.NET Core身份添加到现有的Core mvc项目中? [英] How add ASP.NET Core identity to existing Core mvc project?

查看:104
本文介绍了如何将ASP.NET Core身份添加到现有的Core mvc项目中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Mac上使用CLI在没有身份的情况下启动了dotnet核心mvc项目,现在我想添加此功能.到目前为止,我唯一知道的选择是通过

I have already started my dotnet core mvc project without identity on Mac with CLI and now I want to add this feature. The only option I have known till now is to create a new project by

dotnet new mvc --auth

是否有更好的方法可以向现有项目添加身份?我希望有一个"dotnet new"命令.

Is there a better way to add identity to an existing project? I hope there is a 'dotnet new' command.

推荐答案

您需要通过VS Code中的CLI通过nup packge来添加该nuget packge:

You need to add this nuget packge via CLI in VS Code:

dotnet add package Microsoft.AspNetCore.Identity 

这篇关于如何将ASP.NET Core身份添加到现有的Core mvc项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆