<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Naresh.Jois &#187; LINQ2SQL</title>
	<atom:link href="http://www.nareshjois.com/tag/linq2sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nareshjois.com</link>
	<description>Home of a professional developer &#38; a aspiring photographer</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:57:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Use Debug output window to monitor SQL generated by LINQ2SQL</title>
		<link>http://www.nareshjois.com/2010/06/use-debug-window-to-monitor-sql/</link>
		<comments>http://www.nareshjois.com/2010/06/use-debug-window-to-monitor-sql/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 06:38:48 +0000</pubDate>
		<dc:creator>naresh</dc:creator>
				<category><![CDATA[.net Programming]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[LINQ2SQL]]></category>

		<guid isPermaLink="false">http://www.nareshjois.com/?p=789</guid>
		<description><![CDATA[In all the examples out there to see the SQL generated by a LINQ2SQL query console.out is used, but to monitor the SQL in a debug window we need to write a special text writer implementation using System.IO; using System.Text; using System.Diagnostics; using System.Globalization; using System; namespace nj.Diagnostics &#123; /// &#60;summary&#62; /// Implements a &#60;see [...]]]></description>
			<content:encoded><![CDATA[<p>In all the examples out there to see the SQL generated by a LINQ2SQL query console.out is used, but to monitor the SQL in a debug window we need to write a special text writer implementation</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:consolas, monaco;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.IO</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Diagnostics</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Globalization</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">namespace</span> nj<span style="color: #008000;">.</span><span style="color: #0000FF;">Diagnostics</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
    <span style="color: #008080; font-style: italic;">/// Implements a &lt;see cref=&quot;TextWriter&quot;/&gt; for writing information to the debugger log.</span>
    <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
    <span style="color: #008080; font-style: italic;">/// &lt;seealso cref=&quot;Debugger.Log&quot;/&gt;</span>
    <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> DebuggerWriter <span style="color: #008000;">:</span> TextWriter
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #6666cc; font-weight: bold;">bool</span> isOpen<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> UnicodeEncoding encoding<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">readonly</span> <span style="color: #6666cc; font-weight: bold;">int</span> level<span style="color: #008000;">;</span>
        <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">readonly</span> <span style="color: #6666cc; font-weight: bold;">string</span> category<span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// Initializes a new instance of the &lt;see cref=&quot;DebuggerWriter&quot;/&gt; class.</span>
        <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> DebuggerWriter<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">:</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">0</span>, Debugger<span style="color: #008000;">.</span><span style="color: #0000FF;">DefaultCategory</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// Initializes a new instance of the &lt;see cref=&quot;DebuggerWriter&quot;/&gt; class with the specified level and category.</span>
        <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;level&quot;&gt;A description of the importance of the messages.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;category&quot;&gt;The category of the messages.&lt;/param&gt;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> DebuggerWriter<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> level, <span style="color: #6666cc; font-weight: bold;">string</span> category<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">:</span> <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">&#40;</span>level, category, CultureInfo<span style="color: #008000;">.</span><span style="color: #0000FF;">CurrentCulture</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// Initializes a new instance of the &lt;see cref=&quot;DebuggerWriter&quot;/&gt; class with the specified level, category and format provider.</span>
        <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;level&quot;&gt;A description of the importance of the messages.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;category&quot;&gt;The category of the messages.&lt;/param&gt;</span>
        <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;formatProvider&quot;&gt;An &lt;see cref=&quot;IFormatProvider&quot;/&gt; object that controls formatting.&lt;/param&gt;</span>
        <span style="color: #0600FF; font-weight: bold;">public</span> DebuggerWriter<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> level, <span style="color: #6666cc; font-weight: bold;">string</span> category, IFormatProvider formatProvider<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">:</span> <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">&#40;</span>formatProvider<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">level</span> <span style="color: #008000;">=</span> level<span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">category</span> <span style="color: #008000;">=</span> category<span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">this</span><span style="color: #008000;">.</span><span style="color: #0000FF;">isOpen</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> Dispose<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">bool</span> disposing<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            isOpen <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Dispose</span><span style="color: #008000;">&#40;</span>disposing<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> Write<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">char</span> value<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">!</span>isOpen<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">throw</span> <span style="color: #008000;">new</span> ObjectDisposedException<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
            Debugger<span style="color: #008000;">.</span><span style="color: #0000FF;">Log</span><span style="color: #008000;">&#40;</span>level, category, value<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> Write<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> value<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">!</span>isOpen<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">throw</span> <span style="color: #008000;">new</span> ObjectDisposedException<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>value <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                Debugger<span style="color: #008000;">.</span><span style="color: #0000FF;">Log</span><span style="color: #008000;">&#40;</span>level, category, value<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #6666cc; font-weight: bold;">void</span> Write<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">char</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> buffer, <span style="color: #6666cc; font-weight: bold;">int</span> index, <span style="color: #6666cc; font-weight: bold;">int</span> count<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #008000;">!</span>isOpen<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">throw</span> <span style="color: #008000;">new</span> ObjectDisposedException<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>buffer <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span> <span style="color: #008000;">||</span> index <span style="color: #008000;">&lt;</span> <span style="color: #FF0000;">0</span> <span style="color: #008000;">||</span> count <span style="color: #008000;">&lt;</span> <span style="color: #FF0000;">0</span> <span style="color: #008000;">||</span> buffer<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span> <span style="color: #008000;">-</span> index <span style="color: #008000;">&lt;</span> count<span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">base</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Write</span><span style="color: #008000;">&#40;</span>buffer, index, count<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// delegate throw exception to base class</span>
            <span style="color: #008000;">&#125;</span>
            Debugger<span style="color: #008000;">.</span><span style="color: #0000FF;">Log</span><span style="color: #008000;">&#40;</span>level, category, <span style="color: #008000;">new</span> <span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&#40;</span>buffer, index, count<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">override</span> Encoding Encoding
        <span style="color: #008000;">&#123;</span>
            get
            <span style="color: #008000;">&#123;</span>
                <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>encoding <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
                <span style="color: #008000;">&#123;</span>
                    encoding <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> UnicodeEncoding<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">false</span>, <span style="color: #0600FF; font-weight: bold;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #008000;">&#125;</span>
                <span style="color: #0600FF; font-weight: bold;">return</span> encoding<span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">int</span> Level
        <span style="color: #008000;">&#123;</span>
            get <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">return</span> level<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">string</span> Category
        <span style="color: #008000;">&#123;</span>
            get <span style="color: #008000;">&#123;</span> <span style="color: #0600FF; font-weight: bold;">return</span> category<span style="color: #008000;">;</span> <span style="color: #008000;">&#125;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>The you can use
</pre>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:consolas, monaco;">datacontext<span style="color: #008000;">.</span><span style="color: #0000FF;">log</span> <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DebuggerWriter<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nareshjois.com/2010/06/use-debug-window-to-monitor-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cascade Delete with Linq2SQL</title>
		<link>http://www.nareshjois.com/2009/12/cascade-delete-with-linq2sql/</link>
		<comments>http://www.nareshjois.com/2009/12/cascade-delete-with-linq2sql/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 17:46:52 +0000</pubDate>
		<dc:creator>naresh</dc:creator>
				<category><![CDATA[.net Programming]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[LINQ2SQL]]></category>

		<guid isPermaLink="false">http://www.nareshjois.com/?p=660</guid>
		<description><![CDATA[Consider this, you have Invoice and Invioce details in 2 tables and the details are referenced by InvoiceId, What happens to Invoice Details once you delete the invoice ?, In SQL atleast you can do cascade delete and also set the value to null, but most real life programs would want to delete the details, [...]]]></description>
			<content:encoded><![CDATA[<p>Consider this, you have Invoice and Invioce details in 2 tables and the details are referenced by InvoiceId, What happens to Invoice Details once you delete the invoice ?, In SQL atleast you can do cascade delete and also set the value to null, but most real life programs would want to delete the details, Linq2SQL by default tries to set a null value which in most cases fails, and there is no visual way to set this the only way to do this is to do some manual xml editing.<br />
Right click and open the .dbml file with the XML Editor and then navigate to the table for which you want to do this, then look for the relation which references the parent table</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:consolas, monaco;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;association</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">Member</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">ThisKey</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">OtherKey</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">Type</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">IsForeignKey</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Now add DeleteOnNull=&#8221;true&#8221; to this association so this behaves as expected</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:consolas, monaco;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;association</span> <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">Member</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">ThisKey</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">OtherKey</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">Type</span>=<span style="color: #ff0000;">&quot;....&quot;</span> <span style="color: #000066;">IsForeignKey</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000066;">DeleteOnNull</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.nareshjois.com/2009/12/cascade-delete-with-linq2sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LINQ2SQL RAD with confidence</title>
		<link>http://www.nareshjois.com/2009/01/linq2sql-rad-with-confidence/</link>
		<comments>http://www.nareshjois.com/2009/01/linq2sql-rad-with-confidence/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 07:22:07 +0000</pubDate>
		<dc:creator>naresh</dc:creator>
				<category><![CDATA[.net Programming]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[LINQ2SQL]]></category>

		<guid isPermaLink="false">http://www.nareshjois.com/?p=286</guid>
		<description><![CDATA[If you are like me who also does have to done some rapid prototyping and application development, you know how painstaking it is to do setup each wire for even a simple application to work, and you will be working so rapidly that you would have forgotten the column names you have entered in db [...]]]></description>
			<content:encoded><![CDATA[<p>If you are like me who also does have to done some rapid prototyping and application development, you know how painstaking it is to do setup each wire for even a simple application to work, and you will be working so rapidly that you would have forgotten the column names you have entered in db few minutes ago, that fact aside you would still require a large prieces of code which would actually constitute the middle tier of application, but the problem is in RAD you do need a top notch middle tier which would cover all the aspects required, then what ? and add to that the fact that you are so used to working with objects that you have even forgotten how to retrive data just using code or you find the whole connection &#8211; adapter &#8211; dataset thing too outdated and too much work just to retrive one row from db.</p>
<p>Now we know what a middle teir is , its nothing but an ORM which maps objects to data along with addtional functions to manipulate that data, for this there exists good amount of code generators which based on your database would generate all code required which would constitute the core of middle tier, but i always found them to be too cumberome ( may be i am too lazy) , now may be some year and a half ago , i was working on a project which extensively used LINQ for queying objects, instead of writing functions for each thing, till then LINQ has become second nature, and i wonder how i used to to do this when LINQ was not around, same time i started looking web for LINQ and i saw something about DLINQ which is now reffered to as LINQ2SQL, LINQ2SQL does what we need to do the hard way, wire up. Just create a new LINQ2SQL class in your project and drag the tables from Server Explorer and voila , you have your midddle tier ready (well not exactly) , it creates classes for each of the table in the db along with associations for relations ,  (eg : If i have a students table in it creates a student class with each column in student as a property, and if you have something like SectionId in Student which links to the section table you can access the linked section by just using Student.Section). Everything becomes so simple from here on, atleast for RAD, It also creates functions for SPs,</p>
<p>The only problem i have with this till date is it works only with SQL Server (I have been able to get it working with SQLCE &#8211; If  this only worked with MySQL) and some things like serialization doesn&#8217;t happen the way i want it to , but anyway this is a tool which you have to use once to get know its usefullness.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nareshjois.com/2009/01/linq2sql-rad-with-confidence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

