From 57bc8b9788e95d178cfaee6a9f708864beb4894e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E7=82=B3=E7=87=81=20Ian?= Date: Tue, 22 Nov 2022 17:40:01 +0800 Subject: [PATCH] chore : try to chage db collation this will fix the bug, but I don't think that's root case, so remarked. --- TestEfContains/MyDbContext.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TestEfContains/MyDbContext.cs b/TestEfContains/MyDbContext.cs index 5c23093..8fb254a 100644 --- a/TestEfContains/MyDbContext.cs +++ b/TestEfContains/MyDbContext.cs @@ -30,6 +30,8 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) protected override void OnModelCreating(ModelBuilder modelBuilder) { + //if change db collation, will fix that bug, but you need drop db and rebuild again. + //modelBuilder.UseCollation("Chinese_Taiwan_Stroke_CI_AS"); modelBuilder.Entity(entity => { entity.HasKey(e => e.StockId) .HasName("pk_test");