Use ADO.NET Entity Data Model utility for stored procedures or vie

R

Roy

I use ADO.NET Entity Data Model to generate code. I have two stored
procedures with complex logic. They return tabular records that are logically
related.
If I add function importer for the stored procedures, the utility does not
generate the class for the returned value for me. Instead it asks for the
object model classes.
If I converted the stored procedures as views and generate code for them, I
cannot specify the relationship between the views so the relationship between
the classes are lost.
Is there a way to generate classes that keeps the relationships when using
ADO.NET Entity Data Model utility for stored procedures or views? I use the
generated class for readonly purposes.
 
M

Mike Schuch

I ran into this same roadblock. It is extremely simple in Visual Studio 2010!

In 2010 when you use the function importer there is a button to read the columns returned by the stored procedure and create a complex type automatically. This is missing in 2008 from what I can tell.



Roy wrote:

Use ADO.NET Entity Data Model utility for stored procedures or vie
07-Oct-09

I use ADO.NET Entity Data Model to generate code. I have two store
procedures with complex logic. They return tabular records that are logicall
related
If I add function importer for the stored procedures, the utility does no
generate the class for the returned value for me. Instead it asks for th
object model classes
If I converted the stored procedures as views and generate code for them,
cannot specify the relationship between the views so the relationship betwee
the classes are lost
Is there a way to generate classes that keeps the relationships when usin
ADO.NET Entity Data Model utility for stored procedures or views? I use th
generated class for readonly purposes.

Previous Posts In This Thread:

Use ADO.NET Entity Data Model utility for stored procedures or vie
I use ADO.NET Entity Data Model to generate code. I have two store
procedures with complex logic. They return tabular records that are logicall
related
If I add function importer for the stored procedures, the utility does no
generate the class for the returned value for me. Instead it asks for th
object model classes
If I converted the stored procedures as views and generate code for them,
cannot specify the relationship between the views so the relationship betwee
the classes are lost
Is there a way to generate classes that keeps the relationships when usin
ADO.NET Entity Data Model utility for stored procedures or views? I use th
generated class for readonly purposes.


Submitted via EggHeadCafe - Software Developer Portal of Choice
A Framework to Animate WPF and Silverlight Pages Similar to the PowerPoint Slides
http://www.eggheadcafe.com/tutorial...0-c7354940d878/a-framework-to-animate-wp.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top