0

We have done a migration from Microsoft SQL Server to Oracle. We use Entity Framework Core code-first.

We have some columns in the databases of type nchar(n), and as you already know, if we insert 'ismail' into a NCHAR(10) column, it will be inserted as 'ismail '.

When we point the connection string to SQL Server and we search for a record by its Id, it's found and retrieved and works fine. But when we connect to Oracle, it returns null because I need to add spaces to the Id.

I tried this in my entity model. But this didn't worked.

entity.Property(e => e.Name)
      .HasConversion(new ValueConverter<string, string>(v => v.TrimEnd(), v => 
       v.TrimEnd()));

0 Answers0