The EntityManager that we use is actually something we code-gen ourselves; it derives from an object that derives from IdeaBlade.EntityModel.EntityManager.
When doing something like verification of a property, we want to go to the database to make sure the input is valid. We do this by casting the EntityManager on the entity to our own type and then querying the EntityQueries contained within. This works great on the client with a property trigger, but with instance verification on the server we get an InvalidCastException when trying to cast EntityManager to our derived type:
Unable to cast object of type 'IdeaBlade.EntityModel.EntityManager' to type 'MaintenanceProject.Business.EntityManager'.
I'm not sure if the EntityManager is replaced on the server or our custom EntityManager type isn't making it to the server... any ideas?