manav inder
manav inder

Reputation: 3611

How to create complex type in Entity Framework 4.0

While creating function imports in Model Browser, Get Column Information does not returns any columns, probably the reason is this

My stored procedure returns data from a temp table and at the end of procedure i drop that table.

I am not sure, Please confirm, if this is the case, No column information, So create complex type is also not possible for this case.

Please suggest me how to create complex type manually for the procedures whose column information does not resolved by function imports screen.

Thanks

Upvotes: 0

Views: 3767

Answers (3)

user863386
user863386

Reputation:

There is no automated way to do this, you have to do it manually. Just do a right click on the complex type and start adding what you want to add.

Upvotes: 1

Eric Yin
Eric Yin

Reputation: 9003

I always JSON the object and save as string, then unJSON back. Even for ExpandoObject, works well.

Specially these days I save the data to Azure table, more easy to scale and affordable

Upvotes: 1

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364389

OMG, have you heard about Google?

How to create and modify complex types - first link!

EF is not able to infer complex types from stored procedures using some more complex techniques like dynamic SQL, temp tables, different result sets per control flow in stored procedure, multiple result sets, etc.

Upvotes: 9

Related Questions