More than one migrations configuration type was found in the assembly 'SMSApp'. Specify the name of the one to use

后端 未结 2 1628
渐次进展
渐次进展 2021-02-04 03:06

I am developing a mvc 5 application using code first approach.

i am facing an issue . at first time when i try below comands , it worked and generate the table in that d

2条回答
  •  别那么骄傲
    2021-02-04 03:42

    Enable

    • Migrations
    • ContextTypeName DropDownList_plus_Crud_project.User_Complete
    • MigrationsDirectory Migrations.Identity

      1. If First DBContext is added already in your project then you have to add the second DBContext.
      2. Go to Tool>Nuget-Package-Console.
      3. Enable-Migrations -ContextTypeName ProjectName.DBContextName -MigrationsDirectory NameofFile Which you want to create
      4. Successfully Created 2nd Migration in your project.

提交回复
热议问题