0
我正在學習MVC5身份驗證 我已經有一個現有的數據庫並具有取決於該數據庫的DataContext,該數據庫具有用戶表非常類似於aspnetuser,我也有作爲aspnetrol的角色。我試圖將ASP.NET Identity集成到我的項目中。 我應該刪除我的數據庫中添加標識後使用的USer,角色表?以及我如何將aspnetuser連接到我的表? 這是我的數據庫的照片我添加身份 enter image description here如何將ASP.NET MVC5身份驗證添加到具有用戶,角色表的現有數據庫
我讀過How to add ASP.NET MVC5 Identity Authentication to existing database 和 Integrating ASP.NET Identity to existing database
你不需要數據庫中的asp表。相反,您可以使用自定義表格來獲取asp身份。請參閱下面我的答案中的文章。 –
[點擊這裏](https://stackoverflow.com/questions/31960433/adding-asp-net-mvc5-identity-authentication-to-an-existing-project),你會找到答案。 – Hamid