<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/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>One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx</link><description>In previous posts this month I showed how to use LINQ to SQL classes with a couple different Combobox data binding scenarios. (You can read those articles here and here .) Today I'm going to show you how to create a one-to-many data entry form (and we</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#10325819</link><pubDate>Sun, 01 Jul 2012 01:57:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10325819</guid><dc:creator>peyman ebrahimi</dc:creator><description>&lt;p&gt;Hi Beth,&lt;/p&gt;
&lt;p&gt;Does the XML changes need to be considered in VS2010?&lt;/p&gt;
&lt;p&gt;Peyman&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10325819" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#10249121</link><pubDate>Mon, 19 Dec 2011 09:47:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10249121</guid><dc:creator>Rajesh</dc:creator><description>&lt;p&gt;Does Linq to SQL support ODBC Data provider with System DSN?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10249121" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#10163708</link><pubDate>Thu, 12 May 2011 09:21:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10163708</guid><dc:creator>prasad</dc:creator><description>&lt;p&gt;hi this is prasad&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&lt;a rel="nofollow" target="_new" href="http://the-thoughtspot.blogspot.com"&gt;the-thoughtspot.blogspot.com&lt;/a&gt; rel=&amp;quot;dofollow&amp;quot;&amp;gt;blogspot&amp;lt;/a&amp;gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10163708" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#10102537</link><pubDate>Thu, 09 Dec 2010 09:26:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10102537</guid><dc:creator>Sven</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;great tutorial.&lt;/p&gt;
&lt;p&gt;It would be nice if you can show the code for adding child items to the collection (i.e. Navigation property because I&amp;#39;m in Entity Framework).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10102537" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#10086292</link><pubDate>Thu, 04 Nov 2010 19:38:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10086292</guid><dc:creator>Alberto</dc:creator><description>&lt;p&gt;Hi Beth, I have a question for you.. how I can connect one master table to a 2 child tables, so my id from the master table need to be link to both child tables...&lt;/p&gt;
&lt;p&gt;example: &lt;/p&gt;
&lt;p&gt;master table &amp;nbsp; &amp;nbsp; child table 1 &amp;nbsp; &amp;nbsp; &amp;nbsp;child table 2&lt;/p&gt;
&lt;p&gt;Id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; detail_id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;product_id&lt;/p&gt;
&lt;p&gt;name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; id &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; id&lt;/p&gt;
&lt;p&gt;etc &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cost &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; description&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10086292" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#10058067</link><pubDate>Sat, 04 Sep 2010 09:53:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10058067</guid><dc:creator>Monah</dc:creator><description>&lt;p&gt;hi, i am using this idea &amp;quot;Master/detail&amp;quot; and i am trying to cancel the adding on the child table before submitting the data to the database, when the client do this step it generates error &amp;quot; Cannot remove an entity that has not been attached&amp;quot; and when i try to attach the entity when i create the child, if the number of children is 1 it works else it generate an error &amp;quot; Cannot add an entity with a key that is already in use &amp;quot;, do you have any idea about this problem please?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10058067" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#9974292</link><pubDate>Sun, 07 Mar 2010 08:02:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9974292</guid><dc:creator>Ehabahe Samuel</dc:creator><description>&lt;p&gt;Pls Beth Massi,&lt;/p&gt;
&lt;p&gt;Can You be more specific on how to create the BaseBusiness class in &amp;nbsp;LINQ To SQL NTier Application&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9974292" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#9898219</link><pubDate>Wed, 23 Sep 2009 02:17:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9898219</guid><dc:creator>Piyush Varma</dc:creator><description>&lt;p&gt;How do I fetch a default value from the table and assign it to the blank field of a new record for insert in UI after I click Insert New please?&lt;/p&gt;
&lt;p&gt;Alternatively, can I hard code a default value in the insert new row in the UI so that the user can either accept it or change it before inserting it in the database?&lt;/p&gt;
&lt;p&gt;Thank you, Beth.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9898219" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#9890367</link><pubDate>Wed, 02 Sep 2009 15:40:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9890367</guid><dc:creator>Ben Gu</dc:creator><description>&lt;p&gt;Hi Beth, I have a very tricky question for you. &amp;nbsp;I have a master-detail datagridview and I also want to have some text box related to master dataset and detail dataset to show current value in the datagridview. &amp;nbsp;However, when I run the program (VB.NET), it pops up a running error of &amp;quot;the column doesn't belong to the detail table.&amp;quot; &amp;nbsp;If I just keep the common fields textbox for both dataset, it's ok. &amp;nbsp;Anything outside of the common fields but only with detail dataset, I will see the running error. &amp;nbsp;I wonder if theoretically I just can't bind the textbox to the detail dataset. &amp;nbsp;Thanks. &amp;nbsp;By the way, if possible, this is my email: ben.gu@tpwd.state.tx.us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9890367" width="1" height="1"&gt;</description></item><item><title>re: One-To-Many (Master-Detail) Forms with LINQ to SQL</title><link>http://blogs.msdn.com/b/bethmassi/archive/2008/02/19/one-to-many-master-detail-forms-with-linq-to-sql.aspx#9470872</link><pubDate>Wed, 11 Mar 2009 21:44:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9470872</guid><dc:creator>Beth Massi</dc:creator><description>&lt;p&gt;Hi Sunil,&lt;/p&gt;
&lt;p&gt;The Aggregate keyword is VB-specific and isn't supported in C#. Instead you have to call the .Sum extension method and pass it a lambda expression. This should help you get started:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/vcsharp/aa336747.aspx"&gt;http://msdn.microsoft.com/en-us/vcsharp/aa336747.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;-B&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9470872" width="1" height="1"&gt;</description></item></channel></rss>