Entity Framework Pitfalls: Cannot Return Complex Types From SQL Queries

Clarified: thanks, Diego!

Methods in Entity Framework that return entities from SQL queries, such as DbSet<T>.SqlQuery and ObjectContext.ExecuteStoreQuery, cannot create complex types as parts of an entity. This is a known problem, whose resolution you can track here: Support entities with complex types in SqlQuery (ExecuteStoreQuery and Translate).

There isn’t much you can do about it at the moment, we will just have to wait for this to be implemented.

                             

2 Comments

Add a Comment

As it will appear on the website

Not displayed

Your website