I haven’t seen it anywhere, but I’m wondering if Code First has an implementation of the Translate method described here. I’m currently using the Materialize method used in the EFExtensions project (modified for use with Code First), but I assume this method has these benefits:
- Probably knows what to do with complex types based on mappings instead of making assumptions off of property names.
- Probably returns the object proxies instead of the actual
Tspecified.
Does anyone know enough about this method to comment on my assumptions, and does anyone know if this is available with Code First?
Just tried it. This example is in C#
Regarding your questions:
InvalidOperationException.