簡體   English   中英

mvc5 IdentityAuthenticationManager重置數據庫

[英]mvc5 IdentityAuthenticationManager reset database

我將如何重置支持Microsoft.AspNet.Identity.EntityFramework.IdentityAuthenticationManager的數據庫。

我去添加Database.SetInitializer(new DropCreateDatabaseAlways<>); 到global.asax,但是我應該對TContext使用什么?

如果您不自定義內容,則可能需要DefaultIdentityDbContext:

        Database.SetInitializer(new DropCreateDatabaseAlways<DefaultIdentityDbContext>());

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM