We currently have a bunch of custom code (helper methods, etc.) in our custom sub-class of EntityManager - and that is in addition to all the code that the standard T4s generate (for building entity queries and stored procedure queries). The trouble comes when we are on the Web Server during a query or save. In that case, all the Entity Managers are just the 'vanilla' EntityManager class so we end up with a lot of code that needs to behave slightly differently on the server than it does on the client. It's not terrible but the friction is starting to add up and I think we need to do something about it.
I'm looking at moving all the logic that is currently in our EntityManager sub-class into a separate standalone class that can 'wrap' any EntityManager and provide the same query building, etc. logic. With some simple tweaks in the T4s, this doesn't look to hard. However, I first wanted to ask if you would consider making this the default behavior (or perhaps some sort of configuration / opt-in behavior)? It seems like this would be a good feature in general if the EntityManagers on the sever could be the custom typed version.
But if it doesn't seem like that will happen, I'll go ahead with my standalone helper class idea.
Thanks,
-Stephen