How to use Select Stored Procedures with Dynamic Datahttp://forums.asp.net/t/1384041.aspx/1?How+to+use+Select+Stored+Procedures+with+Dynamic+DataSun, 08 Mar 2009 11:08:24 -040013840412936828http://forums.asp.net/p/1384041/2936828.aspx/1?How+to+use+Select+Stored+Procedures+with+Dynamic+DataHow to use Select Stored Procedures with Dynamic Data <p>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.</p> <p>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?</p> <p>&nbsp;</p> <p>-MARK-</p> <p>&nbsp;</p> 2009-02-12T13:09:10-05:002937438http://forums.asp.net/p/1384041/2937438.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p>You can view the Dynamic Data samples here: <a href="http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14473"> http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14473</a>. 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</p> 2009-02-12T17:21:43-05:002937750http://forums.asp.net/p/1384041/2937750.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p>Scott,</p> <p>&nbsp;Thank you for your respnse. Based on your answer my next question is ...</p> <p>what is the best way to handle situations like this?&nbsp; 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...</p> <p>&nbsp;Thanks again for your responses.</p> <p>&nbsp;</p> <p>-MARK-</p> 2009-02-12T19:37:20-05:002937969http://forums.asp.net/p/1384041/2937969.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p>Noam's blog on <a class="" href="http://blogs.msdn.com/adonet/archive/2008/03/26/stored-procedure-mapping.aspx"> Stored Procedure Mapping</a> shows you how to do this with EF. I'm working on a dynamic data (DD)&nbsp;version. Note, this is really a L2S or EF question, not DD.</p> <p>Mapping entities to multi-table joins to do updates is a difficult problem. You might try posting that on </p> <p><strong>Post </strong><a href="http://msdn.microsoft.com/en-us/vcsharp/aa904594.aspx" target="_blank"><strong>LINQ</strong></a><strong> To SQL Questions </strong><a href="http://social.msdn.microsoft.com/forums/en-US/linqprojectgeneral/threads/" target="_blank"><strong>here</strong></a><br> <strong>Post Entity Framework Questions </strong><a href="http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/threads/" target="_blank"><strong>here</strong></a></p> 2009-02-12T21:23:28-05:002940490http://forums.asp.net/p/1384041/2940490.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p>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.</p> 2009-02-13T18:55:45-05:002940589http://forums.asp.net/p/1384041/2940589.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p><strike>See </strike><a class="" href="http://blogs.msdn.com/adonet/archive/2008/12/05/table-splitting-mapping-multiple-entity-types-to-the-same-table.aspx"><strike>Table Splitting: Mapping multiple entity types to the same table.</strike></a></p> <p>Actually that does the opposite and won't help. I'll see if I can find a tutorial.</p> 2009-02-13T19:41:42-05:002940609http://forums.asp.net/p/1384041/2940609.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p>Thanks... appreciate anything you can find.</p> 2009-02-13T19:50:24-05:002989848http://forums.asp.net/p/1384041/2989848.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p>&nbsp;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?<br> </p> 2009-03-07T16:26:29-05:002990174http://forums.asp.net/p/1384041/2990174.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p>Just map sproc's to select/update/delete. Noam writes in <a class="" href="http://blogs.msdn.com/adonet/archive/2008/03/26/stored-procedure-mapping.aspx"> his blog</a>:</p> <p>&nbsp;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.<br> </p> <p>You can also map sProcs in L2S</p> 2009-03-07T23:08:39-05:002990301http://forums.asp.net/p/1384041/2990301.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p>&nbsp;How would one code the SqlCatalogProvider into the Linq to Sql .dbml file? Preferrably VB?<br> </p> 2009-03-08T02:08:41-05:002990703http://forums.asp.net/p/1384041/2990703.aspx/1?Re+How+to+use+Select+Stored+Procedures+with+Dynamic+DataRe: How to use Select Stored Procedures with Dynamic Data <p></p> <blockquote><span class="icon-blockquote"></span> <h4>nbrglobalinc</h4> How would one code the SqlCatalogProvider into the Linq to Sql .dbml file? Preferrably VB?<br> </blockquote> see <a title="Re: Help w/ Small Business Kit and DD" href="http://forums.asp.net/p/1394270/2990700.aspx#2990700"> Re: Help w/ Small Business Kit and DD</a> <p></p> 2009-03-08T11:08:24-04:00