简体   繁体   中英

how set individual user accounts and enable-migrations in mvc vs 2017

Recently I have installed vs 2017, before that I utilized vs 2012 and when I created web application mvc , I didn't have any problem on choosing individual user accounts icon so I can get my classes like AccountController.cs and so on. but now after creating mvc application ,I can't get window of choosing individual user accounts, so when I type code like this in package manager console:

  • PM> enable-migrations

I get this error :

No context type was found in the assembly 'vidly'

I know why I get this error because I don't have any dbcontex class, but I don't no how create identitymodel.cs which was default model of individual user accounts option and inherits from identitydbcontex.So how can I handle this in vs2017?

After searching a lot I got that this feature in vs 2017 has totally removed, but you can add it by your self. Here: individual user accounts in vs 2017 Hope its useful for others.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM