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

后端 未结 2 1630
渐次进展
渐次进展 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.

    0 讨论(0)
  • 2021-02-04 03:46

    You need to specify which configuration you want to use when updating the databases.

    Update-Database -ConfigurationTypeName MyRenamedConfiguration
    
    0 讨论(0)
提交回复
热议问题