Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 08, 2009 11:08 AM by sjnaughton
Feb 12, 2009 01:09 PM|LINK
I have found examples for using UPDATE, INSERT and DELETE Stored Procedures with Dynamic data however I can;t seem to find anything on using a Select Stored Procedure.
I have a Select Stored procedure that is fairly complex and pulls data from 6 differant tables using inner Joins. What's the bext way to use Dynamic Data with this type of Sproc?
ASP.NET Dynamic Data
Feb 12, 2009 05:21 PM|LINK
You can view the Dynamic Data samples here:
http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14473. There is a sample called DynamicDataSProc which shows using stored procedures to do all the operations. Note that Linq to SQL supports things like paging, filtering, etc automatically
and when you move to a stored procedure you need to do all of this manually. See the example for details
Feb 12, 2009 07:37 PM|LINK
Thank you for your respnse. Based on your answer my next question is ...
what is the best way to handle situations like this? I need to be able to display data from several Tables (using joins) in the same grid and be able to update and insert to those table also. Is there a way to handle this type of situation with LINQ to
SQL and/or Entities and Dynamic Data? I can do this by hand writing all the code but I'd love to find a more automated way...
Thanks again for your responses.
Feb 12, 2009 09:23 PM|LINK
Noam's blog on
Stored Procedure Mapping shows you how to do this with EF. I'm working on a dynamic data (DD) version. Note, this is really a L2S or EF question, not DD.
Mapping entities to multi-table joins to do updates is a difficult problem. You might try posting that on
Post LINQ To SQL Questions
Post Entity Framework Questions here
Feb 13, 2009 06:55 PM|LINK
Linq to SQL/Entity Framework are modeling tools and so for CRUD operatoins they expect the item to exist in the model. So lets say you want to have 3 fields from table A and 4 fields from table B. What you should do is create a new object in the modeling
tool that contains the items that you want. Then you would map your insert. update and delete stored procs to this new object your stored procedures. Now you can create a Linq query to bring back these objects and update them. Somewhere there has got to be
a tutorial on this.
Feb 13, 2009 07:41 PM|LINK
See Table Splitting”: Mapping multiple entity types to the same table.
Actually that does the opposite and won't help. I'll see if I can find a tutorial.
Feb 13, 2009 07:50 PM|LINK
Thanks... appreciate anything you can find.
Mar 07, 2009 04:26 PM|LINK
Now what if you want to use a stored procedure such as the ones found in the Small Business kit, like the GetChildItems, how would you code this into Dynamic Data?
Mar 07, 2009 11:08 PM|LINK
Just map sproc's to select/update/delete. Noam writes in
At this time, the Entity Framework requires you to map all three stored procedures. You cannot map only the delete stored procedure. In addition, the entity type must still be mapped to a table, view, or query view.
You can also map sProcs in L2S
Mar 08, 2009 02:08 AM|LINK
How would one code the SqlCatalogProvider into the Linq to Sql .dbml file? Preferrably VB?