EF Core
I detected a problem, to occur was like this:
Code: Select all
CREATE DATABASE TestED
GO
USE TestED
GO
CREATE TABLE [dbo].[TableA]
(
[TableAId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1)
)
GO
CREATE TABLE [dbo].[TableB]
(
[TableBId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1),
[TableAId] [int] NOT NULL,
[TableAId_Other] [int] NULL
)
GO
ALTER TABLE [dbo].[TableB] ADD CONSTRAINT [FK_TableB_TableA] FOREIGN KEY ([TableAId]) REFERENCES [dbo].[TableA] ([TableAId])
GO
ALTER TABLE [dbo].[TableB] ADD CONSTRAINT [FK_TableB_TableA_Other] FOREIGN KEY ([TableAId_Other]) REFERENCES [dbo].[TableA] ([TableAId])
GO
CREATE TABLE [dbo].[TableC]
(
[TableCId] [int] NOT NULL PRIMARY KEY IDENTITY(1, 1),
)
GO
I rename the two navigation properties to TableA and TableAOther
If I immediately add the TableC, the problem does not occur.
But if I close the model and open it again, and add the TableC or have any changes in the database and want to update, I lose the changes I made to the name.
This is a huge bug.
I have over 500 tables and with the navigation properties renamed and if I update anything in the layout I totally get close to the work I've done.
This happened the first time. I saved it, closed it and remembered that I needed to add a field.
Soon after I adjusted and lost everything I had done.