First, we are storing our view cache in the DB.
We ran into an issue where the View cache was out of date and was causing the System.Data.Entity.Core.EntityCommandCompilationException to be thrown.
Inner Exception:
The query view generated for the EntitySet 'Vendors' is not valid. The query parser threw the following error : The argument type 'Edm.String' is not compatible with the property 'IsTraining' of formal type 'Edm.Boolean'.
I ended up clearing the __ViewCache table and restarted the application. When is the view cache updated? Should we be performing any maintenance on the table, regularly?