I\'m working with a third-party database in which all text values are stored as char(n). Some of these text values are primary keys, whereas others are just nor
char(n)
If you are using Entity Framework Core, you can use Conversion like this:
Conversion
entity.Property(e => e.Name) .HasConversion( new ValueConverter(v => v.TrimEnd(), v => v.TrimEnd()));