tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Complex types and stored procedures

31 Jan 2010 2 mins Entity Framework, Visual Studio

I like the idea of complex type. Sadly the designer didn’t supported complex types in EFv1/VS2008, although you could use it manually editing the model (it’s just a XML file). The designer in EFv2/VS2010 supports complex types (and you can use it also with EFv1, see this) hence it’s time to start really using these.

Unfortunately nothing is perfect. As far as you don’t wanna map some stored procedure result to collection of entities, then the designer will tell you, that it’s not supported. 😦 And Jeff Derstadt pointed in forum that this limitation will not be solved in RTM.

I’m using EFv4 in my current project and thanks to ability to map functions directly to LINQ functions via EdmFunction attribute I was able to to a lot of work via functions and queries created by EF itself. But I always feel a little bug in my head saying “What if you’ll need it later?". Sure I can redo all back into direct properties, but if it’s close to the end of the project it’s pretty expensive to do it.

What a pity, I see complex types as a good concept, but I’m too careful to close myself the path with SPs.

Profile Picture Jiří Činčura is .NET, C# and Firebird expert. He focuses on data and business layers, language constructs, parallelism, databases and performance. For almost two decades he contributes to open-source, i.e. FirebirdClient. He works as a senior software engineer for Microsoft. Frequent speaker and blogger at www.tabsoverspaces.com.