<?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>Joe Stevens&#039; Blog &#187; Linq</title>
	<atom:link href="http://www.joe-stevens.com/category/linq/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joe-stevens.com</link>
	<description>Everything .NET and C#</description>
	<lastBuildDate>Sat, 24 Jul 2010 00:23:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Convert a comma separated string of numbers to an integer array using C#</title>
		<link>http://www.joe-stevens.com/2010/06/10/convert-a-comma-separated-string-of-numbers-to-an-integer-array-using-c/</link>
		<comments>http://www.joe-stevens.com/2010/06/10/convert-a-comma-separated-string-of-numbers-to-an-integer-array-using-c/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 05:51:35 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[CSV]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=487</guid>
		<description><![CDATA[Today I needed to convert a comma separated string of numbers in an integer array. Here is how you can do it in one line using Linq:

string csv = &#34;1,1,2,3,5,8,13,21,34&#34;;
int[] numbers = csv.Split(',').Select(n =&#62; int.Parse(n)).ToArray();

    ]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/06/10/convert-a-comma-separated-string-of-numbers-to-an-integer-array-using-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq to XML Tutorial</title>
		<link>http://www.joe-stevens.com/2010/01/08/linq-to-xml-tutorial/</link>
		<comments>http://www.joe-stevens.com/2010/01/08/linq-to-xml-tutorial/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 02:42:09 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[linq to xml]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=377</guid>
		<description><![CDATA[Download source
This is an introduction to Linq to XML showing how to read, insert, update and delete from an XML file.

First of all lets look at the XML file I will be using:

&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;Customers&#62;
 &#60;Customer ID=&#34;1&#34;&#62;
  &#60;Forename&#62;Joe&#60;/Forename&#62;
  &#60;Surname&#62;Stevens&#60;/Surname&#62;
  &#60;DOB&#62;31/01/1983&#60;/DOB&#62;
  &#60;Location&#62;Sydney&#60;/Location&#62;
 &#60;/Customer&#62;
 &#60;Customer ID=&#34;2&#34;&#62;
  &#60;Forename&#62;Tom&#60;/Forename&#62;
  &#60;Surname&#62;Male&#60;/Surname&#62;
  &#60;DOB&#62;02/02/1977&#60;/DOB&#62;
  &#60;Location&#62;Brisbane&#60;/Location&#62;
 &#60;/Customer&#62;
 &#60;Customer ID=&#34;3&#34;&#62;
  &#60;Forename&#62;Emily &#60;/Forename&#62;
  &#60;Surname&#62;Stevens&#60;/Surname&#62;
  &#60;DOB&#62;14/01/1988&#60;/DOB&#62;
  &#60;Location&#62;Sydney&#60;/Location&#62;
 &#60;/Customer&#62;
 &#60;Customer ID=&#34;4&#34;&#62;
  &#60;Forename&#62;Lee&#60;/Forename&#62;
  &#60;Surname&#62;Phipps&#60;/Surname&#62;
  &#60;DOB&#62;05/12/1982&#60;/DOB&#62;
  &#60;Location&#62;Melbourne&#60;/Location&#62;
 &#60;/Customer&#62;
 &#60;Customer ID=&#34;5&#34;&#62;
  &#60;Forename&#62;Saul&#60;/Forename&#62;
  &#60;Surname&#62;Stevens&#60;/Surname&#62;
  &#60;DOB&#62;02/08/1984&#60;/DOB&#62;
  &#60;Location&#62;Perth&#60;/Location&#62;
 &#60;/Customer&#62;
&#60;/Customers&#62;

As you can see it&#8217;s a very simple list of customers.  In my project I [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2010/01/08/linq-to-xml-tutorial/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Linq to SQL Tutorial &#8211; Linq to SQL Generic Framework using reflection</title>
		<link>http://www.joe-stevens.com/2009/12/28/linq-to-sql-generic-framework-using-reflection/</link>
		<comments>http://www.joe-stevens.com/2009/12/28/linq-to-sql-generic-framework-using-reflection/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 03:01:11 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[generic]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/2009/12/28/linq-to-sql-generic-framework-using-reflection/</guid>
		<description><![CDATA[Download source code
In a previous post; Base Repository/Business Logic wrapper, I talked about a basic Linq to SQL Framework I created.  I then extended it in my ObjectDataSource binding with paging and sorting post to show how to use it with the ObjectDataSource.
The problem was that although it worked quite nicely for getting all [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/12/28/linq-to-sql-generic-framework-using-reflection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq to SQL Tutorial &#8211; Using Load Options to preload data immediately without lazy loading</title>
		<link>http://www.joe-stevens.com/2009/11/23/linq-to-sql-using-load-options-to-preload-data-immediately-without-lazy-loading/</link>
		<comments>http://www.joe-stevens.com/2009/11/23/linq-to-sql-using-load-options-to-preload-data-immediately-without-lazy-loading/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 09:49:27 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq To SQL]]></category>
		<category><![CDATA[load options]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=304</guid>
		<description><![CDATA[Download source
With Linq to SQL lazy loading is used by default. That means that if one object contains another object, the child object will only be loaded when first accessing it.  Using Load Options it is possible to tell Linq to SQL to also load the child object at the same time as loading [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/11/23/linq-to-sql-using-load-options-to-preload-data-immediately-without-lazy-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq Tutorial &#8211; Using the Enumerable.Any extension method</title>
		<link>http://www.joe-stevens.com/2009/09/21/linq-using-the-enumerable-any-extension-method/</link>
		<comments>http://www.joe-stevens.com/2009/09/21/linq-using-the-enumerable-any-extension-method/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 00:18:21 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[enumerable]]></category>
		<category><![CDATA[enumerable.all]]></category>
		<category><![CDATA[extension methods]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=266</guid>
		<description><![CDATA[Consider the following:

Using Linq I want to select all the roles for a particular user.  I could create a query like this:


public List&#60;Role&#62; GetByUserID(int userID)
{
    List&#60;Role&#62; roles = (from r in Context.Roles
                    [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/09/21/linq-using-the-enumerable-any-extension-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linq to SQL &#8211; Using EntitySet.Remove to delete records</title>
		<link>http://www.joe-stevens.com/2009/09/18/linq-to-sql-using-entityset-remove-to-delete-records/</link>
		<comments>http://www.joe-stevens.com/2009/09/18/linq-to-sql-using-entityset-remove-to-delete-records/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 04:04:22 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[DeleteOnNull]]></category>
		<category><![CDATA[DMBL]]></category>
		<category><![CDATA[EntitySet]]></category>
		<category><![CDATA[EntitySet.Remove]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=256</guid>
		<description><![CDATA[Download source
Quite often you have two tables with a linker table which causes Linq to SQL to generate an EntitySet of the related records in each table.
Take the following example:

Here, the User entity will have an EntitySet called UserRoles containing the Role entities that the user is part of.
When I want to remove a role from a user [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/09/18/linq-to-sql-using-entityset-remove-to-delete-records/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linq to SQL Tutorial &#8211; ObjectDataSource binding with paging and sorting</title>
		<link>http://www.joe-stevens.com/2009/07/15/linq-to-sql-objectdatasource-binding-with-paging-and-sorting/</link>
		<comments>http://www.joe-stevens.com/2009/07/15/linq-to-sql-objectdatasource-binding-with-paging-and-sorting/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 06:27:01 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Filtering]]></category>
		<category><![CDATA[Linq To SQL]]></category>
		<category><![CDATA[ObjectDataSource]]></category>
		<category><![CDATA[Paging]]></category>
		<category><![CDATA[Searching]]></category>
		<category><![CDATA[Sorting]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=152</guid>
		<description><![CDATA[Update: 31/10/2009 &#8211; Added source code
ASP.Net has the LinqDataSource which is a handy control but it embeds the business logic in the page which I don&#8217;t like.  In this post am I going to use the repository objects I created in my last post to bind a GridView using an ObjectDataSource enabling filtering, sorting, [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/07/15/linq-to-sql-objectdatasource-binding-with-paging-and-sorting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linq to SQL Tutorial &#8211; Base Repository/Business Logic wrapper</title>
		<link>http://www.joe-stevens.com/2009/07/15/linq-to-sql-base-repositorybusiness-logic-wrapper/</link>
		<comments>http://www.joe-stevens.com/2009/07/15/linq-to-sql-base-repositorybusiness-logic-wrapper/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 00:29:41 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://www.joe-stevens.com/?p=148</guid>
		<description><![CDATA[Before Linq to SQL I always separated out my Entities, Data Access Layer and Business Logic Layer.  With Linq to SQL it&#8217;s a little different as I feel the generated classes are kind of like the Entity and Data Access Layer combined.  Rather than using the generated entities directly it is still good practice to [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/07/15/linq-to-sql-base-repositorybusiness-logic-wrapper/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linq to SQL with WCF Services</title>
		<link>http://www.joe-stevens.com/2009/07/10/linq-to-sql-with-wcf-services/</link>
		<comments>http://www.joe-stevens.com/2009/07/10/linq-to-sql-with-wcf-services/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 03:32:37 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Linq]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://joestevens.wordpress.com/?p=121</guid>
		<description><![CDATA[I was interested to see how I could use Linq to SQL with WCF Services to load and save data using a Silverlight project.  In this post I will expand upon the database I created in my Linq to SQL Tutorial and the console application I wrote for my Set inheritance modifiers with SQLMetal post.
The first [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/07/10/linq-to-sql-with-wcf-services/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linq To SQL Tutorial &#8211; Set inheritance modifiers with SQLMetal</title>
		<link>http://www.joe-stevens.com/2009/07/01/linq-to-sql-set-inheritance-modifiers-with-sqlmetal/</link>
		<comments>http://www.joe-stevens.com/2009/07/01/linq-to-sql-set-inheritance-modifiers-with-sqlmetal/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 05:34:26 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[base class]]></category>
		<category><![CDATA[entitybase]]></category>
		<category><![CDATA[Linq To SQL]]></category>
		<category><![CDATA[sqlmetal]]></category>

		<guid isPermaLink="false">http://joestevens.wordpress.com/?p=116</guid>
		<description><![CDATA[I have created an base class which my entities inherit from that gives a property called IsNew which returns true if the the value of ID is 0; all of my tables use ID for the identifier.

 

public abstract class EntityBase
{
    public virtual int ID { get; set; }

    public bool IsNew
    {
        get
        {
            return ID [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/07/01/linq-to-sql-set-inheritance-modifiers-with-sqlmetal/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Linq To SQL Tutorial &#8211; EntityBase &#8211; Base class for entities</title>
		<link>http://www.joe-stevens.com/2009/07/01/linq-to-sql-entitybase-base-class-for-entities/</link>
		<comments>http://www.joe-stevens.com/2009/07/01/linq-to-sql-entitybase-base-class-for-entities/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 04:52:53 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[base class]]></category>
		<category><![CDATA[entitybase]]></category>
		<category><![CDATA[Linq To SQL]]></category>
		<category><![CDATA[sqlmetal]]></category>

		<guid isPermaLink="false">http://joestevens.wordpress.com/?p=113</guid>
		<description><![CDATA[When using Linq To SQL you may often find yourself in a position where you want each of your entities to inherit from a base class.  As generated classes are partial classes you could create a second partial class for each entity which inherits a base class, but this is impractical.  The O/R designer does [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/07/01/linq-to-sql-entitybase-base-class-for-entities/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linq To SQL Tutorial</title>
		<link>http://www.joe-stevens.com/2009/07/01/linq-to-sql-tutorial/</link>
		<comments>http://www.joe-stevens.com/2009/07/01/linq-to-sql-tutorial/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 23:04:06 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Linq To SQL]]></category>

		<guid isPermaLink="false">http://joestevens.wordpress.com/?p=94</guid>
		<description><![CDATA[Check out some of my other Linq to SQL posts:

EntityBase
Inheritance Modifiers with SQLMetal
Linq to SQL with WCF Services
Linq to SQL Framework (Repository/Business wrapper)
ObjectDataSource binding with server side paging and sorting
Load Options
Generic Framework using reflection

This is a basic tutorial for using Linq To SQL introducing some of the concepts behind it.
For this tutorial I have created [...]]]></description>
		<wfw:commentRss>http://www.joe-stevens.com/2009/07/01/linq-to-sql-tutorial/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
