I'm using this LINQ to check if input is valid
Where 'input' is a string and Kansalaisuuskoodi is a string mapped to a char(3) column (model generated from a Firebird database).
This call will fail if the length of input string is not exactly 3 characters:
This seems odd to me, since Firebird sql is working as expcted with such a query (comparing char(3) column with a varchar(5) input).
So currently I compare the lenght of the input before checking the database, but this seems like something should not be needed.
Any idea what could cause this exception?