JonPSmith / EfCore.TestSupport

Tools for helping in unit testing applications that use Entity Framework Core
https://www.thereformedprogrammer.net/new-features-for-unit-testing-your-entity-framework-core-5-code/
Other
352 stars 53 forks source link

EfSchemaCompare: Wrong difference reported on generated value #2

Closed novar0 closed 6 years ago

novar0 commented 6 years ago

Entity: public class NormativeReference { [Key, MaxLength (50)] public string NormativeReferenceId { get; set; } public string Name { get; set; } }

SQL (SQL Server 2014): CREATE TABLE [dbo].[NormativeReferences] ( [NormativeReferenceId] NVARCHAR (50) NOT NULL, [Name] NVARCHAR (MAX) NULL, CONSTRAINT [PK_NormativeReferences] PRIMARY KEY CLUSTERED ([NormativeReferenceId] ASC) );

CompareEfWithDb returns: DIFFERENT: NormativeReference->Property 'NormativeReferenceId', value generated. Expected = OnAdd, found = Never

JonPSmith commented 6 years ago

Hi @novar0,

I have reproduced this issue, but I couldn't find a way to detect the situation in EF Core. I have therefore raised an issue with the EF Core team. Once I have their feedback I will fix the problem.

Thanks again for bringing this issue up.

JonPSmith commented 6 years ago

Fixed in version 1.1.3 of NuGet