I am very new to EF so my descriptions may not make sense. Please ask me to clarify anything and I'll do my best to find the answer. In an existing application we are using EF4. 95% of our string columns in our db are varchar, but we do have 5% being nvarchar. In the edmx file, I see the columns have the proper Unicode property set to true or false. Then we use .tt file to generate our entity classes. The problem is that the generated queries are trying to convert everything to unicode which is obviously slowing down all of our queries.
I found the following answers here but I don't believe they will help me. The first is using ColumnAttribute but from what I can see, this was not available until v4.1. The second seems like it overrides on a global level (although I don't understand where). Because we do have some nvarchar columns, I don't think this will work either. I've also seen use of AsNonUnicode() method. I have not fully researched if this is available in v4 because that seems like it needs to be used specifically every time we send a query. This is a large application so this would be a huge undertaking. Are these my only options here? Am I missing something? Any advice is appreciated.