- 1401/09/10
- 0
- 82
باگ در ساخت دیتابیس با EFCore با توجه به آموزش ما
سلام و وقت بخیر
بنده دوره ASP.NET Core شما رو دارم طبق ویدیو ها جلو میرم ولی هنگامی که می خوام از طریق EFCore دیتابیس ساخته شود در بخش ADD Migration خطای زیر رو دریافت می کنم در حالی که کد مشابه مورد شماست. فقط اینکه بنده روی Net Core 6 دارم پروژه رو اجرا می کنم. خطا به شرح زیر است:
The foreign key property 'Order.CustomerId1' was created in shadow state because a conflicting property with the simple name 'CustomerId' exists in the entity type, but is either not mapped, is already used for another relationship, or is incompatible with the associated primary key type. See https://aka.ms/efcore-relationships for information on mapping relationships in EF Core.
The foreign key property 'OrderDetail.OrderId1' was created in shadow state because a conflicting property with the simple name 'OrderId' exists in the entity type, but is either not mapped, is already used for another relationship, or is incompatible with the associated primary key type. See https://aka.ms/efcore-relationships for information on mapping relationships in EF Core.
An operation was scaffolded that may result in the loss of data. Please review the migration for accuracy.
لطفا راهنمایی کنید.
- 1401/09/10
سلام
مایگریشن های قبلی را Remove کنید و ارتباطاتی که در مسیج خطا نمایش داده شده را دوباره بررسی نمایید که بدرستی تعریف کرده باشید
پاسخی برای این باگ ارسال کنید
لطفا کدها را درون قطعه کد ارسال نمایید
برای ارسال پاسخ باید وارد حساب کاربری خود شوید
ورود به حساب کاربری