简体   繁体   中英

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

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM