PostgreSQL で Entity Framework Core(Npgsql.EntityFrameworkCore.PostgreSQL) を使っていて、 テーブルの主キーの列に character(n) 型を使っていたら、 エンティティの更新に失敗して嵌った。 再現サンプルは下記の通り。 using Microsoft.EntityFrameworkCore; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Threading.Tasks; namespace NpgsqlEFSample { [Table("books")] public class Book { [Key] [R
