<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET Dynamic Data</title><link>http://forums.asp.net/1145.aspx</link><description>Discussions regarding the new scaffolding framework in ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: using of stored procedure</title><link>http://forums.asp.net/thread/2596074.aspx</link><pubDate>Tue, 02 Sep 2008 20:10:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2596074</guid><dc:creator>scothu</dc:creator><author>scothu</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2596074.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2596074</wfw:commentRss><description>&lt;p&gt;You can see a sample of using stored procedures with Linq to SQL and Dynamic Data at our samples page: &lt;a href="http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14473"&gt;http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14473&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this example the Contact table is driven by stored procedures. Here are the basic steps:&lt;/p&gt;
&lt;p&gt;1) Create a Insert, Delete and Update stored procedure. The drag them into the Linq to SQL designer.&lt;/p&gt;
&lt;p&gt;2) Click on the entity you want to associate the stored procedures to, in the property window (F4) there will be Insert, Update and Delete options you can select. Select each and associate them to your stored procedures from step 1.&lt;/p&gt;
&lt;p&gt;3) For the List page you want to override create a directory based on the table name in the DynamicData\CustomPages directory, drag the List.aspx from the DynamicData\PageTemplates into this directory.&lt;/p&gt;
&lt;p&gt;4) Write a stored procedure that does all the operations you want to support. To fully support Dynamic Data it should do paging, sorting and filtering (if their are any foreign key tables). You will need to manually add this stored procedure to the generated Linq to SQL datacontext using a partial class.&lt;/p&gt;
&lt;p&gt;5) In the List.aspx you will need to override the OnSelecting event from the LinqDataSource and call the stored procedure from setp 4 passing the paging, sorting and filter options.&lt;/p&gt;
&lt;p&gt;The sample I&amp;#39;ve provided does all of these steps for the Contact table.&amp;nbsp;The Linq to SQL model&amp;nbsp;has references to the Insert and Delete stored procedures. The Contact entity in the Linq to SQL model has the stored procedures associated with the Insert, Update and Delete operations, there is a custom page for the&amp;nbsp;Contact&amp;nbsp;List.aspx. it has an override of the OnSelecting event that calls the Get stored procedure passing&amp;nbsp;the appropriate parameters and the data context is extended in a&amp;nbsp;partial class to contain the&amp;nbsp;call for the Get stored procedure.&lt;/p&gt;
&lt;p&gt;This is alot of work but if you are used to using stored procedures these are the same things you would do outside of Linq to SQL.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>using of stored procedure</title><link>http://forums.asp.net/thread/2588657.aspx</link><pubDate>Fri, 29 Aug 2008 11:41:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2588657</guid><dc:creator>Balyk</dc:creator><author>Balyk</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2588657.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1145&amp;PostID=2588657</wfw:commentRss><description>I need to find a way of using stored procedure in dynamic data&amp;#39;s web site.

For example on Northwind database I create stored procedure 

create procedure UpdateCategories
as CategoryID int...
...

And In Linq to SQL designer I was created Data Function &amp;quot;UpdateCategories&amp;quot;

How can I applay my Data Function in my project for Update my Categories?</description></item></channel></rss>