<?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>ilyav.net Software</title>
	<atom:link href="http://ilyav.net/Index.php?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://ilyav.net</link>
	<description>Ilya&#039;s Personal Software Development Site</description>
	<lastBuildDate>Sun, 01 Aug 2010 12:01:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SubSonic 3.0 SimpleRepository = sweetness</title>
		<link>http://ilyav.net/?p=70</link>
		<comments>http://ilyav.net/?p=70#comments</comments>
		<pubDate>Mon, 14 Sep 2009 20:04:31 +0000</pubDate>
		<dc:creator>Ilya</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ilyav.net/?p=70</guid>
		<description><![CDATA[MVC ASP.NET is great. Add SQLite and you get easy deployment for a small site. Add Subsonic 3.0 SimpleRepository and you get sweetness.]]></description>
			<content:encoded><![CDATA[<p>MVC ASP.NET is great. Add SQLite and you get easy deployment for a small site. Add SubSonic 3.0 SimpleRepository and you get sweetness.</p>
<p>The kind of sweetness that you get when you need to crank out a site quickly and with least amount of configuration hassle on the web host (I&#8217;m looking at you, SQL Server) and you find the tools to make everything just fall in place so you can concentrate on business logic. The kind of sweetness that makes updating schema on servers that don&#8217;t give you access to the SQL Server via control panel a breeze! The kind of sweetness&#8230; it&#8217;s pretty cool, is all I&#8217;m saying&#8230;</p>
<p>It all boils down to the following code:</p>
<pre class="brush: c#;">var repo = new SimpleRepository("DBConnString", SimpleRepositoryOptions.RunMigrations);</pre>
<p>What this does is, every time  you use this repository and your DB doesn&#8217;t have a table or properties of the class you are trying to persist, it will create them on the fly! So you can create a blank database, SimpleRepository object and go to town:</p>
<pre class="brush: c#;">Order order = new Order();
order.LastName = collection["LastName"];
order.FirstName = collection["FirstName"];
order.DateEntered = DateTime.Now;
repo.Add(order);</pre>
<p>That&#8217;s it! SubSonic will create an Order table with LastName, FirstName, DateEntered properties and add a new order.</p>
<p>Now, obviously we do need to tell SubSonic <em>something </em>about our class&#8230; So, here&#8217;s what my Order class looks like:</p>
<pre class="brush: c#;">public class Order
{
        [SubSonicPrimaryKey]
        public Int64 OrderID { get; set; }
        public DateTime? DateEntered { get; set; }
        [SubSonicNullString]
        public string FirstName { get; set; }
        [SubSonicNullString]
        public string LastName { get; set; }
}</pre>
<p>As you can see, I just told SubSonic which item is the primary key (Int64 being a requirement for SQLite 3.0 compatibility) and that I want my strings to be nullable. Note, though, that it will actually figure out that my DateTime will be nullable as well &#8212; all by itself.</p>
<p>So, now I want to retrieve something. SubSonic&#8217;s Linq provider makes that a snap also:</p>
<pre class="brush: c#;">    var ordersPerUser = repo.Find(x =&gt; x.LastName == "Lastname");</pre>
<p>Anyway, check out the new version of <a href="http://www.subsonicproject.com/" target="_blank">SubSonic</a>, it&#8217;s awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://ilyav.net/?feed=rss2&amp;p=70</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world! Again!</title>
		<link>http://ilyav.net/?p=1</link>
		<comments>http://ilyav.net/?p=1#comments</comments>
		<pubDate>Mon, 07 Sep 2009 17:51:43 +0000</pubDate>
		<dc:creator>Ilya</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ilyav.net/?p=1</guid>
		<description><![CDATA[So, I started to set up my new site again. This time I&#8217;m going with Wordpress. I&#8217;ve used it before as a blog and didn&#8217;t like how it turned out. Now, however,  I&#8217;m going to use it more as a CMS, which since version 2.1 it apparently is much easier to do.
]]></description>
			<content:encoded><![CDATA[<p>So, I started to set up my new site again. This time I&#8217;m going with Wordpress. I&#8217;ve used it before as a blog and didn&#8217;t like how it turned out. Now, however,  I&#8217;m going to use it more as a CMS, which since version 2.1 it apparently is much easier to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://ilyav.net/?feed=rss2&amp;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
