<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title></title>
	<atom:link href="http://gabrielflorit.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gabrielflorit.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Aug 2010 20:01:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gabrielflorit.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title></title>
		<link>http://gabrielflorit.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gabrielflorit.wordpress.com/osd.xml" title="" />
	<atom:link rel='hub' href='http://gabrielflorit.wordpress.com/?pushpress=hub'/>
		<item>
		<title>New Post</title>
		<link>http://gabrielflorit.wordpress.com/2010/08/30/new-post/</link>
		<comments>http://gabrielflorit.wordpress.com/2010/08/30/new-post/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 19:42:01 +0000</pubDate>
		<dc:creator>Gabriel Florit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gabrielflorit.wordpress.com/?p=57</guid>
		<description><![CDATA[public ViewResult List(int page = 1, string category = null) { const int pageSize = 3; IEnumerable products; int currentPage; int pageCount; using (_repository.NewSession()) { IQueryable queryableProducts = !string.IsNullOrEmpty(category) ? _repository.AsQueryable().Where(x =&#62; x.Category == category) : _repository.AsQueryable(); pageCount = Utility.DivideAndRoundUp(queryableProducts.Count(), pageSize); if (page pageCount) { page = 1; } currentPage = page; products = queryableProducts.Skip((page [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gabrielflorit.wordpress.com&amp;blog=13949019&amp;post=57&amp;subd=gabrielflorit&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code><br />
		public ViewResult List(int page = 1, string category = null)<br />
		{<br />
			const int pageSize = 3;<br />
			IEnumerable products;<br />
			int currentPage;<br />
			int pageCount;</p>
<p>			using (_repository.NewSession())<br />
			{<br />
				IQueryable queryableProducts = !string.IsNullOrEmpty(category)<br />
															? _repository.AsQueryable().Where(x =&gt; x.Category == category)<br />
															: _repository.AsQueryable();<br />
				pageCount = Utility.DivideAndRoundUp(queryableProducts.Count(), pageSize);<br />
				if (page  pageCount)<br />
				{<br />
					page = 1;<br />
				}<br />
				currentPage = page;<br />
				products = queryableProducts.Skip((page - 1) * pageSize).Take(pageSize);<br />
			}</p>
<p>			return View(new ProductListModel(category, products, currentPage, pageCount));<br />
		}</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gabrielflorit.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gabrielflorit.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gabrielflorit.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gabrielflorit.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gabrielflorit.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gabrielflorit.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gabrielflorit.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gabrielflorit.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gabrielflorit.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gabrielflorit.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gabrielflorit.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gabrielflorit.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gabrielflorit.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gabrielflorit.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gabrielflorit.wordpress.com&amp;blog=13949019&amp;post=57&amp;subd=gabrielflorit&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gabrielflorit.wordpress.com/2010/08/30/new-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7214acdea146fcd74caf6290c233722?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gabrielflorit</media:title>
		</media:content>
	</item>
	</channel>
</rss>
