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),
[SType] [INT] NOT NULL,
[Cod] [NVARCHAR] (50) NULL,
[Name] [NVARCHAR] (200) NOT NULL
)
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_TableA_SType_Cod] ON [dbo].[TableA] ([SType], [Cod]) WHERE ([Cod] IS NOT NULL)
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_TableA_SType_Name] ON [dbo].[TableA] ([SType], [Name]) WHERE ([Cod] IS NULL)
GO
In this my UNIQUE has a where but it made no difference in the problem.
It doesn't recognize it and is also in the update loop of always thinking it has changed.