<?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>Thinking Different &#187; LINQ</title>
	<atom:link href="http://christianpayne.com.au/category/development/linq/feed/" rel="self" type="application/rss+xml" />
	<link>http://christianpayne.com.au</link>
	<description></description>
	<lastBuildDate>Thu, 09 Sep 2010 17:11:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Getting VS 2008 &amp; mysql to play nicely!</title>
		<link>http://christianpayne.com.au/2010/05/03/getting-vs-2008-mysql-to-play-nicely/</link>
		<comments>http://christianpayne.com.au/2010/05/03/getting-vs-2008-mysql-to-play-nicely/#comments</comments>
		<pubDate>Mon, 03 May 2010 03:12:45 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://christianpayne.com.au/?p=324</guid>
		<description><![CDATA[I love linq! But getting mysql to place nicely isn&#8217;t so straight forward.   To get mysql running on .net 3.5 or 4.0 I had to do the following: 1.  Install the mysql .net connector 2.  Add the MySQL Data Provider line in the DbProviderFactories to your machine.config file: &#60;system.data&#62; &#60;DbProviderFactories&#62;   &#60;add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://christianpayne.com.au/category/development/linq/">linq</a>!</p>
<p>But getting mysql to place nicely isn&#8217;t so straight forward.   To get mysql running on .net 3.5 or 4.0 I had to do the following:</p>
<p>1.  Install the <a href="http://dev.mysql.com/downloads/connector/net/">mysql .net connector</a><br />
2.  Add the <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">MySQL Data Provider <span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;white-space:normal;font-size:13px;">line in the <span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:18px;font-size:12px;white-space:pre;">DbProviderFactories<span style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;line-height:19px;white-space:normal;font-size:13px;"> to your machine.config file:</span></span></span></span></p>
<pre>&lt;system.data&gt;
    &lt;DbProviderFactories&gt;
        &lt;add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.1.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/&gt;</pre>
<div id="_mcePaste">
<pre>    &lt;/DbProviderFactories&gt;
&lt;/system.data&gt;</pre>
<p>(see <a href="http://www.devart.com/forums/viewtopic.php?t=13286">here</a> for more information)</p>
</div>
<div id="_mcePaste">3.  Restart Visual Studio</div>
<div>4.  Add your models and go nuts!</div>
<p>This <a href="http://stackoverflow.com/questions/1863348/how-do-i-set-up-a-connection-string-for-a-mysql-database-in-a-c-project-without">Stack Overflow question</a> helped</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://christianpayne.com.au/2010/05/03/getting-vs-2008-mysql-to-play-nicely/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq &#8211; Multiple Group By</title>
		<link>http://christianpayne.com.au/2010/02/01/linq-multiple-group-by/</link>
		<comments>http://christianpayne.com.au/2010/02/01/linq-multiple-group-by/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 22:29:54 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[group by]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[multiple group by]]></category>

		<guid isPermaLink="false">http://christianpayne.com.au/?p=304</guid>
		<description><![CDATA[This has been bugging me for a LONG time! I&#8217;ve finally found an example of how to group by multiple values using LINQ: IList doc_infos = new List(); doc_infos.Add(new doc_info { region = "UK", price = 100, currency = "US" }); doc_infos.Add(new doc_info { region = "US", price = 100, currency = "US" }); var [...]]]></description>
			<content:encoded><![CDATA[<p>This has been bugging me for a LONG time!</p>
<p>I&#8217;ve finally <a href="http://www.devcurry.com/2009/02/groupby-multiple-values-in-linq.html">found</a> an example of how to group by multiple values using LINQ:<br />
<code>IList doc_infos = new List();</code></p>
<p><code>doc_infos.Add(new doc_info { region = "UK", price = 100, currency = "US" });<br />
doc_infos.Add(new doc_info { region = "US", price = 100, currency = "US" });</p>
<p></code></p>
<p><code>var docs = doc_infos.GroupBy(x =&gt; new { x.price, x.currency })<br />
.Select(group =&gt; new { d = group.Key, Count = group.Count() });</code></p>
<p>For more examples, have a look <a href="http://www.devcurry.com/2009/02/groupby-multiple-values-in-linq.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://christianpayne.com.au/2010/02/01/linq-multiple-group-by/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq &#8211; not in</title>
		<link>http://christianpayne.com.au/2009/08/27/linq-not-in/</link>
		<comments>http://christianpayne.com.au/2009/08/27/linq-not-in/#comments</comments>
		<pubDate>Thu, 27 Aug 2009 23:40:45 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://christianpayne.com.au/?p=229</guid>
		<description><![CDATA[I&#8217;m doing some work with LINQ and outer joins. I found a few links, but it wasn&#8217;t what I was looking for. I then thought I&#8217;d try a different direction and found this! NorthwindDataContext dc = new NorthwindDataContext(); dc.Log = Console.Out; var query = from c in dc.Customers where !(from o in dc.Orders select o.CustomerID) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing some work with LINQ and outer joins.</p>
<p>I found <a href="http://social.msdn.microsoft.com/Forums/en-US/linqprojectgeneral/thread/c139313e-d745-4e1d-b3dc-ab355507eb48">a</a> <a href="http://stackoverflow.com/questions/267488/linq-to-sql-multiple-left-outer-joins">few</a> <a href="http://stackoverflow.com/questions/1122942/linq-to-sql-left-outer-join-with-multiple-join-conditions">links</a>, but it wasn&#8217;t what I was looking for.</p>
<p>I then thought I&#8217;d try a different direction and found <a href="http://introducinglinq.com/blogs/marcorusso/archive/2008/01/14/the-not-in-clause-in-linq-to-sql.aspx">this</a>!</p>
<blockquote><p>NorthwindDataContext dc = new NorthwindDataContext();<br />
dc.Log = Console.Out;<br />
var query =<br />
    from c in dc.Customers<br />
    where !(from o in dc.Orders<br />
            select o.CustomerID)<br />
           .Contains(c.CustomerID)<br />
    select c;<br />
foreach (var c in query) Console.WriteLine( c );</p></blockquote>
<p>This is exactly what I was after!  I thought I&#8217;d share the love and post a comment &#8211; but what?  I have to register to post comments???</p>
<p>I would be a little more understanding if Marco Russo&#8217;s site used some generic, open authentication system.   But he didn&#8217;t.</p>
<p>(If you want to know how easy it is to implement Twitter, Facebook, OpenID or other identification methods, <a href="http://itc.conversationsnetwork.org">IT Conversations</a> <a href="http://itc.conversationsnetwork.org/shows/detail4225.html">recently did a podcast</a> on how they overcame this problem.)</p>
<p>Rock on!</p>
]]></content:encoded>
			<wfw:commentRss>http://christianpayne.com.au/2009/08/27/linq-not-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
