I have an application that is using EntityFramework Code First to create the database if it doesnt exist. And Im using MySQL for the database engine.
I have a table where one of the Key columns needs to be Case-Sensitive. I dont want to mark the entire database or table as case-sensitive using collation, so the best way to do it (that I know of) is to mark the column as BINARY.
Does anyone know how to do this using Code First? I tried doing:
[Column(TypeName = "varchar(100) BINARY")]
but it doesn't like that, the first time I access the DB Model I get
An exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll but was not handled in user code
Additional information: Sequence contains no matching element
Maybe I should just do an ALTER TABLE after the database is created?