【问题标题】:Column names in each table must be unique. Column name 'CategoryId' in table 'Products' is specified more than once. Migration Update Issue每个表中的列名必须是唯一的。多次指定表 \'Products\' 中的列名 \'CategoryId\'。迁移更新问题
【发布时间】:2022-12-03 16:36:51
【问题描述】:

I am using visual studio with sql server, i am in a middle of a practice and faced a major issue. The issue was in the first place, when i was creating a product table , by mistake i mistyped as a categoryId ctegoryId, and later i recorrected it by thinking its over.

And now I am almost done with the identity scaffolding when updating my database, I am facing such an error. and I\'ve tried all ways to update it by myself but failed. I need an expert guidance so I can continue my path till the end.

I do appreciate any solution from your side.

Thanks indeed [Migration error \"Each Table must be unique\"](https://i.stack.imgur.com/tB3iT.png)

  • Include your product class here in your question instead of screenshot.
  • What if you run this command Add-Migration -IgnoreChanges and then run Update-Database

标签: asp.net-mvc asp.net-core datatable sql-update database-migration


【解决方案1】:
猜你喜欢
  • 2015-12-27
  • 1970-01-01
  • 1970-01-01
  • 2016-06-06
  • 2017-04-03
  • 1970-01-01
  • 1970-01-01
  • 2022-01-14
  • 1970-01-01
相关资源
最近更新 更多