<?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>Gregor&#039;s work related blog</title>
	<atom:link href="http://gregorsuttie.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gregorsuttie.com</link>
	<description>.net development and more</description>
	<lastBuildDate>Sun, 13 May 2012 21:24:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gregorsuttie.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Gregor&#039;s work related blog</title>
		<link>http://gregorsuttie.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gregorsuttie.com/osd.xml" title="Gregor&#039;s work related blog" />
	<atom:link rel='hub' href='http://gregorsuttie.com/?pushpress=hub'/>
		<item>
		<title>6 months into the job</title>
		<link>http://gregorsuttie.com/2012/05/13/6-months-into-the-job/</link>
		<comments>http://gregorsuttie.com/2012/05/13/6-months-into-the-job/#comments</comments>
		<pubDate>Sun, 13 May 2012 21:24:35 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1592</guid>
		<description><![CDATA[Monday 11th May will see be me 6 months into my new job, my last place I was there for &#8230;<p><a href="http://gregorsuttie.com/2012/05/13/6-months-into-the-job/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1592&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Monday 11th May will see be me 6 months into my new job, my last place I was there for 11 years so it was quite a big thing for me moving on.</p>
<p>The new job is going well, I like the way we go about our work, we talk about it, we plan it, then we try as best we can to do proper test driven development.</p>
<p>Last week saw us starting a new RavenDB based MVC 3 project which will be using Agile techniques using sprints &#8211; it will also include some new tools which I havent yet used such as initializer and twitter bootstrapper &#8211; more on them to come as I get hands on during the project.</p>
<p>Starting a new project is always great, although we are under pressure to get this out the door, were luck to not having paying customers demanding software releases as soon as possible, this means we don&#8217;t cut corners and can produce code which has been thoroughly tested and due to the tools we use we know it&#8217;s of decent high quality.</p>
<p>Testing driven development has been quite a mind shift from what I have been used to, in the past I would have written the code and then done some manual testing usually from the front end, so this has been a great leap forward &#8211; it&#8217;s not the be all and end all of course and code can still contain bugs, however, changing code and knowing if you broke something is very nice.</p>
<p>The main difference has been using Resharper, style cop and unit tests along with a great build system &#8211; all checked in code has the same style and formatting which is rather nice.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1592/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1592/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1592/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1592&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/05/13/6-months-into-the-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>
	</item>
		<item>
		<title>RavenDB CRUD &#8211; How To</title>
		<link>http://gregorsuttie.com/2012/04/30/ravendb-crud-how-to/</link>
		<comments>http://gregorsuttie.com/2012/04/30/ravendb-crud-how-to/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 19:41:39 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[MVC]]></category>
		<category><![CDATA[NuGet]]></category>
		<category><![CDATA[RavenDB]]></category>
		<category><![CDATA[MVC3]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1459</guid>
		<description><![CDATA[I always wondered how easy it would be to do a RavenDB CRUD (Create, Read, Update, Delete) example, so lets &#8230;<p><a href="http://gregorsuttie.com/2012/04/30/ravendb-crud-how-to/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1459&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I always wondered how easy it would be to do a RavenDB CRUD (Create, Read, Update, Delete) example, so lets create a simple MVC application which we can use to create, read, update and delete. </p>
<p>The following is some very basic code and yes you guessed it not for production but more of a quick sample to get you on your way with RavenDB and adding, editing and deleting documents.</p>
<p>We shall use a product model as our basis for the demo application &#8211; let&#8217;s get started.</p>
<ol>
<li>Create a blank MVC solution to begin with</li>
<li>Using Nuget add in the Nuget package called RavenDB</li>
<li>Lets setup RavenDB as we require within the global.asax.cs file as below:-<br />
<pre class="brush: csharp;">
protected void Application_Start()
{
    AreaRegistration.RegisterAllAreas();

    RegisterGlobalFilters(GlobalFilters.Filters);
    RegisterRoutes(RouteTable.Routes);

    Store = new DocumentStore { ConnectionStringName = &quot;RavenDB&quot;, DefaultDatabase = &quot;Products&quot; };
    Store.Initialize();
}
</pre><br />
Note:- I have added in a DefaultDatabase config value above which means I have created a new Products Raven Database within the RavenDB Management Studio called Products, if you don&#8217;t do this and just want to use the default database then remove the part DefaultDatabase = &#8220;Products&#8221;
</li>
<p></p>
<li>Add a class into the Models folder called Product</a> as below:-<br />
<pre class="brush: csharp;">
public class Product
{
    public string Id { get; set; }
    public string CategoryId { get; set; }
    public string SupplierId { get; set; }
    public string Name { get; set; }
    public string Code { get; set; }
    public decimal StandardCost { get; set; }
    public decimal ListPrice { get; set; }
    public int UnitsOnStock { get; set; }
    public int UnitsOnOrder { get; set; }
    public bool Discontinued { get; set; }
}
</pre>
</li>
<p></p>
<li>Now that we have our Model, let&#8217;s go ahead and add in a couple of controllers. We will use a base controller when working with our RavenDB project so firstly create a RavenDB Controller, to do this right-click on controllers folder and then select Add then choose Controller, select Empty Controller.
</li>
<p></p>
<li>Paste this code into your RavenController:-<br />
<pre class="brush: csharp;">
public class RavenController : Controller
{
    public IDocumentSession _session { get; private set; }

    public const int DefaultPage = 1;
    public const int PageSize = 10;

   protected override void OnActionExecuting(ActionExecutingContext filterContext)
   {
       if (filterContext.IsChildAction)
       return;
       _session = MvcApplication.Store.OpenSession();
       base.OnActionExecuting(filterContext);
   }

   protected override void OnActionExecuted(ActionExecutedContext filterContext)
   {
       if (filterContext.IsChildAction)
       return;   

      using (_session)
      {
          if (filterContext.Exception != null)
          return;

          if (_session != null)
         _session.SaveChanges();
      }
   }

    protected int CurrentPage
    {
        get
        {
            var s = Request.QueryString[&quot;page&quot;];
            int result;
            if (int.TryParse(s, out result))
            return Math.Max(DefaultPage, result);
            return DefaultPage;
        }
    }
}
</pre>
</li>
<p></p>
<li>Lets now add a ProductController and this time choose, Controller with empty read/write actions as below:-<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/addcontroller.png?w=529" alt="ProductController" />
</li>
<p></p>
<li>We will start off by adding in some code which I have already written for the methods which we will use on the Products Controller, add them  into your code:-<br />
<pre class="brush: csharp;">
	public class ProductController : RavenController
    {
        //
        // GET: /Product/

        public ActionResult Index()
        {
            var model = _session.Query&lt;Product&gt;()
               .Paging(CurrentPage, DefaultPage, PageSize)
               .ToList();

            Mapper.Map&lt;List&lt;Product&gt;, List&lt;ProductViewModel&gt;&gt;(model);

            return View(model);
        }

        //
        // GET: /Product/Details/5

        public ActionResult Details(string id)
        {
            var model = _session.Load&lt;Product&gt;(id);
            return View(model);
        }

        //
        // GET: /Product/Create

        public ActionResult Create()
        {
            var model = new Product();
            return View(model);
        }

        //
        // POST: /Product/Create

        [HttpPost]
        public ActionResult Create(Product product)
        {
            try
            {
                _session.Store(product);
                return RedirectToAction(&quot;Index&quot;);
            }
            catch
            {
                return View();
            }
        }

        //
        // GET: /Product/Edit/5

        public ActionResult Edit(string id)
        {
            var model = _session.Load&lt;Product&gt;(id);
            return View(model);
        }

        //
        // POST: /Product/Edit/5

        [HttpPost]
        public ActionResult Edit(Product product)
        {
            try
            {
                _session.Store(product);
                return RedirectToAction(&quot;Index&quot;);
            }
            catch
            {
                return View();
            }
        }

        //
        // GET: /Product/Delete/5

        public ActionResult Delete(string id)
        {
            var model = _session.Load&lt;Product&gt;(id);
            return View(model);
        }

        //
        // POST: /Product/Delete/5

        [HttpPost, ActionName(&quot;Delete&quot;)]
        public ActionResult DeleteConfirmed(string id)
        {
            try
            {
                _session.Advanced.DatabaseCommands.Delete(id, null);
                return RedirectToAction(&quot;Index&quot;);
            }
            catch
            {
                return View();
            }
        }

        public ActionResult StoreSomeProductInDatabase()
        {
            var product = new Product
                              {
                                  Name = &quot;Product Name&quot;,
                                  CategoryId = &quot;category/1024&quot;,
                                  SupplierId = &quot;supplier/16&quot;,
                                  Code = &quot;H11050&quot;,
                                  StandardCost = 250,
                                  ListPrice = 189
                              };

            _session.Store(product);
            _session.SaveChanges();

            //return Content(product.Id);
            return RedirectToAction(&quot;Index&quot;);
        }

        public ActionResult InsertSomeMoreProducts()
        {
            for (int i = 0; i &lt; 50; i++)
            {
                var product = new Product
                                  {
                                      Name = &quot;Product Name &quot; + i,
                                      CategoryId = &quot;category/1024&quot;,
                                      SupplierId = &quot;supplier/16&quot;,
                                      Code = &quot;H11050&quot; + i,
                                      StandardCost = 250 + (i*10),
                                      ListPrice = 189 + (i*10),
                                  };
                _session.Store(product);
            }

            _session.SaveChanges();

            //return Content(&quot;Products successfully created&quot;);
            return RedirectToAction(&quot;Index&quot;);
        }

        public ActionResult GetProduct(int id)
        {
            Product product = _session.Load&lt;Product&gt;(id);
            return Content(product.Name);
        }

        public ActionResult LoadAndUpdateProduct()
        {
            Product product = _session.Load&lt;Product&gt;(&quot;products/5&quot;);
            product.ListPrice -= 10;
            _session.SaveChanges();
            return Content(&quot;Product 5 successfully updated&quot;);
        }

        public ActionResult DeleteProduct(int id)
        {
            Product product = _session.Load&lt;Product&gt;(id);
            if (product == null)
                return HttpNotFound(&quot;Product {0} does not exist&quot;);
            _session.Delete(product);
            _session.SaveChanges();
            return Content(string.Format(&quot;Product {0} successfully deleted&quot;, id));
        }

        /// &lt;summary&gt;
        /// Get all the products that are available for sale (discontinued equal to false) ordered by the product’s list price
        /// &lt;/summary&gt;
        /// &lt;returns&gt;&lt;/returns&gt;
        public ActionResult GetDiscontinuedProducts()
        {
            var products = from product in _session.Query&lt;Product&gt;()
                           where product.Discontinued == false
                           orderby product.ListPrice
                           select product;

            return View(products.ToList());
        }
    }
</pre>
</li>
<li>Ok so above we added a lot of code but this is good as this is the entire product controller and will allow us to add/edit/delete new products into RavenDB.</li>
<li>I also added in a couple of methods for creating some test data, and also a method for returning discontinued products, mainly to show how you can go about doing this.</li>
<li>Some screen shots are below, note they show me using RavenDB Profiler and MiniProfiler:-<br />
<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/crud1.png?w=529" alt="Crud 1" /><br />
<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/crud2.png?w=529" alt="Crud 2" /><br />
<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/crud3.png?w=529" alt="Crud 3" />
</li>
</ol>
<p>The code for this article is up on github <a href="https://github.com/gsuttie/RavenMVCProducts" target="_blank">here</a>.<br />
For more on RavenDB have a look at my other RavenDB posts <a href="http://gregorsuttie.com/category/ravendb/" target="_blank">here</a>.</p>
<p>Please leave a comment, ask a question, find a bug or anything like that please let me know.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1459/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1459&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/04/30/ravendb-crud-how-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/addcontroller.png" medium="image">
			<media:title type="html">ProductController</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/crud1.png" medium="image">
			<media:title type="html">Crud 1</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/crud2.png" medium="image">
			<media:title type="html">Crud 2</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/crud3.png" medium="image">
			<media:title type="html">Crud 3</media:title>
		</media:content>
	</item>
		<item>
		<title>Exporting and Importing data with RavenDB</title>
		<link>http://gregorsuttie.com/2012/04/26/exporting-and-importing-data-with-ravendb/</link>
		<comments>http://gregorsuttie.com/2012/04/26/exporting-and-importing-data-with-ravendb/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 18:41:31 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[RavenDB]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1501</guid>
		<description><![CDATA[I was wondering how I would go above upgrading from one build version of RavenDB (build 701) to a newer &#8230;<p><a href="http://gregorsuttie.com/2012/04/26/exporting-and-importing-data-with-ravendb/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1501&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was wondering how I would go above upgrading from one build version of RavenDB (build 701) to a newer version of RavenDB (build 888) and decided to find out how.</p>
<p>As it turns out like most things in RavenDB its very easy! &#8211; the following is how to go about upgrading from one version of RavenDB to another.</p>
<p><b>Note:-</b> You can do it this way and this is the recomended way <a href="http://ravendb.net/docs/server/administration/upgrade">here</a> however I wanted to try doing it using importing and exporting the data.</p>
<p>Please not that this was done on my local dev machine at work and not done in a production environment, it wont cover replication as well as some other things to think about but its covers the basics.</p>
<p>I have RavenDB build 701 running from d:\ravedb-build\701 which runs on http://localhost:8080,  I then added some test documents to the default database.</p>
<p>I noticed RavenDB had been updated to Build 888 and I began to think how do I get the data out of the old build version and into the new version, having a quick look I soon realised that I need to export data from the 701 build and then import that data into the 888 build.</p>
<p>Here is how I went about it:-</p>
<ol>
<li>I have RavenDB build 701 running from c:\ravendb\RavenDB-Build-701\ and had 50 documents within it &#8211; this runs from http://localhost:8080 as seen below:- <img src="http://gregorsuttie.files.wordpress.com/2012/04/raven701.png?w=529" alt="Raven Build 701" />
</li>
<p></p>
<li>I then downloaded RavenDB build 888 and ran that from d:\RavenDB-Build-888\ which was empty &#8211; this runs from http://localhost:8082 as seen below:- <img src="http://gregorsuttie.files.wordpress.com/2012/04/raven8881.png?w=529" alt="Raven Build 888" />
</li>
<p></p>
<li>Now we can see the differences in the document database as below, Raven 701 build with documents:-<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/701studio.png?w=529" alt="701 Studio" />
</li>
<p></p>
<li>And the Raven 888 build with no documents as yet:-<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/888studio.png?w=529" alt="888 Studio" />
</li>
<p></p>
<li>To export and import data within RavenDB you use a tool called smuggler, smuggler can be found within the Smuggler folder and the exe is called Raven.Smuggler.exe
</li>
<p></p>
<li>To export the data from RavenDB Build 700 I went into a command prompt window moved into the location of the smuggler exe and ran the following command -&gt; Raven.Smuggler out http://localhost:8080 dump.raven<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/dump701.png?w=529" alt="Dump of 701" />
</li>
<p></p>
<li>Ok great, now we have exported our data, time to import it into the newer 888 build of RavenDB, to do this we need to a couple of things, firstly locate the dump.raven file in the 701 build/smuggler folder as below:-
<p><img src="http://gregorsuttie.files.wordpress.com/2012/04/701dumpfile.png?w=529" alt="701 dump file location" /></p>
<p>And then copy it to somewhere for importing, to make it easy I just copied it to the smuggler folder within the build 888 as below:-</p>
<p><img src="http://gregorsuttie.files.wordpress.com/2012/04/888dumpfile.png?w=529" alt="888 dump file location" /></p>
<p>Then go to the smuggler folder for this build and then use the following command -&gt; Raven.Smuggler in http://localhost:8082 dump.raven
</li>
<p></p>
<li>We will see Raven ha imported our documents for us:- <img src="http://gregorsuttie.files.wordpress.com/2012/04/imported.png?w=529" alt="Data Imported" />
</li>
<p></p>
<li>Lastly lets check in the new build 888 that our documents are there:-<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/docsimported.png?w=529" alt="Documents Imported" />
</li>
</ol>
<p>And there we go we have moved out documetns from the 701 build to the 888 build, if yo do this you will notice that the index definitions are copied there but havent been built, i.e. youll need to rubuild them manually.</p>
<p>Please feel free to leave a comment if you find this useful or have any questions.</p>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1501/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1501/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1501/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1501&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/04/26/exporting-and-importing-data-with-ravendb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/raven701.png" medium="image">
			<media:title type="html">Raven Build 701</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/raven8881.png" medium="image">
			<media:title type="html">Raven Build 888</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/701studio.png" medium="image">
			<media:title type="html">701 Studio</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/888studio.png" medium="image">
			<media:title type="html">888 Studio</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/dump701.png" medium="image">
			<media:title type="html">Dump of 701</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/701dumpfile.png" medium="image">
			<media:title type="html">701 dump file location</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/888dumpfile.png" medium="image">
			<media:title type="html">888 dump file location</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/imported.png" medium="image">
			<media:title type="html">Data Imported</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/docsimported.png" medium="image">
			<media:title type="html">Documents Imported</media:title>
		</media:content>
	</item>
		<item>
		<title>Fusion Log Files are your friend</title>
		<link>http://gregorsuttie.com/2012/04/03/fusion-log-files-are-your-friend/</link>
		<comments>http://gregorsuttie.com/2012/04/03/fusion-log-files-are-your-friend/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 18:33:41 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1441</guid>
		<description><![CDATA[Firstly this is a very handy tool that a lot of people are unaware of I certainly was, wish I &#8230;<p><a href="http://gregorsuttie.com/2012/04/03/fusion-log-files-are-your-friend/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1441&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Firstly this is a very handy tool that a lot of people are unaware of I certainly was, wish I had known about this when trying to fix ClickOnce issues a few years back.</p>
<p>Today I ran into an issue where a small windows forms application was throwing weird exceptions upon start-up, I also had the misfortune of Nuget.exe throwing a tantrum and a colleague asked me had I tried using the Fusion log viewer.</p>
<p>I had a vague idea what it was and remember seeing that mentioned in the event viewer error logs before, but didn&#8217;t know much more about it. </p>
<p>The following is how to go about enabling logging for when Visual Studio starts throwing weird errors upon loading up an application.</p>
<ol>
<li>First of all click Start, and then type in Fusion Log Viewer into the run box, and then right-click on it and run it as an Administrator.<br />
</p>
<p><img src="http://gregorsuttie.files.wordpress.com/2012/04/fusion2.png?w=529" alt="FusionLog" />
</li>
<li>This will bring up the following:-<br />
<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/fusion3.png?w=529" alt="FusionLog" />
</li>
<li>Click settings and here we enable logging and give it a directory path to save the files to.<br />
Note that the folder needs to be created first, before it will let you give a path:-<br />
<br />
<img src="http://gregorsuttie.files.wordpress.com/2012/04/fusion4.png?w=529" alt="FusionLog" />
</li>
<li>Run the offending app-add in and the log files will be write to the folder you specified.</li>
<li>Upon investigation of these files they usually have a file per missing or wrong assembly, they give you some insight into whats missing as well as the correct version number the code requires.</li>
</ol>
<li>For more info check out Scott Hanselman&#8217;s post on this <a href="http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx" target="_blank">here</a>
</li>
</li>
<p>Let me know if this helps you or any questions then please add a comment.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1441/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1441/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1441/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1441&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/04/03/fusion-log-files-are-your-friend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/fusion2.png" medium="image">
			<media:title type="html">FusionLog</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/fusion3.png" medium="image">
			<media:title type="html">FusionLog</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/04/fusion4.png" medium="image">
			<media:title type="html">FusionLog</media:title>
		</media:content>
	</item>
		<item>
		<title>Practice Code Kata&#8217;s And Learn</title>
		<link>http://gregorsuttie.com/2012/03/30/code-katas/</link>
		<comments>http://gregorsuttie.com/2012/03/30/code-katas/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 20:25:43 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1426</guid>
		<description><![CDATA[I have been reading up on code katas and think they are a fantastic idea, for those of you who &#8230;<p><a href="http://gregorsuttie.com/2012/03/30/code-katas/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1426&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://gregorsuttie.files.wordpress.com/2012/03/brucelee.png"><img src="http://gregorsuttie.files.wordpress.com/2012/03/brucelee.png?w=529" alt="" title="brucelee"   class="alignleft size-full wp-image-1434" /></a>I have been reading up on code katas and think they are a fantastic idea, for those of you who don&#8217;t know what a code kata is have then don&#8217;t worry read on.</p>
<p>A code kata is, as I see it, how to take a requirement, break it down into a list of simple tasks and then write the code to solve those problems, pretty much what a developer would normally do anyway but you could tackle the problem using different coding languages/styles/patterns.</p>
<p>The reason I think code katas are interesting is as follows:-</p>
<ol>
<li>It will help you learn to use TDD &#8211; Use Test Driven Development to write a test before you write the code, write the test, run it so it fails, then write the code to make the test pass and that&#8217;s all, do this for each part of the problem your trying to solve.</li>
<li>Estimate how long you think it will take to complete, then time yourself and see how long you take to complete the code kata.</li>
<li>Help improve your typing skills and learn shortcut keys as you try to be more productive and learn to do the kata quicker each time.</li>
<li>Use them at interviews to test your interviewees, see what they come up with and how they think rather than asking them about something they googled the night before the interview.</li>
<li>The best way to learn how to code well is to practice, just like a musician needs to practice, good developers practice too.</li>
</ol>
<p><strong>Good examples</strong></p>
<p>As a good starting point take a look at Roy Osherove&#8217;s <a href="http://osherove.com/tdd-kata-1/" target="_blank">string calculator</a> &#8211; this can be done using a number of different code languages.</p>
<p>More code Kata&#8217;s can be found below:-</p>
<ul>
<li><a href="http://codingkata.net/" title="Coding Kata" target="_blank">codingkata.net</a></li>
<li><a href="http://osherove.com/tdd-kata-2/" target="_blank">tdd-kata-2</a></li>
</ul>
<p>Let me know if you find any more and I will add to the list.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1426/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1426/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1426/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1426&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/03/30/code-katas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/brucelee.png" medium="image">
			<media:title type="html">brucelee</media:title>
		</media:content>
	</item>
		<item>
		<title>Accessing RavenDB Studio when using Embedded Mode</title>
		<link>http://gregorsuttie.com/2012/03/27/acessing-ravenddb-studio-when-using-embedded-mode/</link>
		<comments>http://gregorsuttie.com/2012/03/27/acessing-ravenddb-studio-when-using-embedded-mode/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 18:08:57 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[RavenDB]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1385</guid>
		<description><![CDATA[I have seen a few people ask how to go about accessing the RavenDB studio when they use RavenDB in &#8230;<p><a href="http://gregorsuttie.com/2012/03/27/acessing-ravenddb-studio-when-using-embedded-mode/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1385&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have seen a few people ask how to go about accessing the RavenDB studio when they use RavenDB in embedded mode, normally you would tend to use embedded mode when unit testing. </p>
<p>In the following article I show you how to get the RavenDB Management Studio working in an MVC 3 application.</p>
<ol>
<li>File, New, MVC 3 Application as below:- <img src="http://gregorsuttie.files.wordpress.com/2012/03/emb1.png?w=529" alt="EmbeddedMode " />
</li>
<li>
Choose whatever you prefer in the next window, I chose Internet Application:- <img src="http://gregorsuttie.files.wordpress.com/2012/03/emb2.png?w=529" alt="EmbeddedMode" />
</li>
<li>Now using Nuget add in the RavenDB Embedded package:- <img src="http://gregorsuttie.files.wordpress.com/2012/03/emb3.png?w=529" alt="EmbeddedMode" />
</li>
<li>Now we need to add in some details for the application to talk to RavenDB, lets do that now, so edit the global.asax.cs file to have the following code:-
<p><pre class="brush: csharp;">
public static IDocumentStore Store { get; set; }

public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
    filters.Add(new HandleErrorAttribute());
}

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute(&quot;{resource}.axd/{*pathInfo}&quot;);

    routes.MapRoute(
                &quot;Default&quot;, // Route name
                &quot;{controller}/{action}/{id}&quot;, // URL with parameters
                new { controller = &quot;Home&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional } // Parameter defaults
                );
}

protected void Application_Start()
{
    AreaRegistration.RegisterAllAreas();
    RegisterGlobalFilters(GlobalFilters.Filters);
    RegisterRoutes(RouteTable.Routes);

    Store = new EmbeddableDocumentStore { 
                                            DataDirectory = &quot;Data&quot;,
                                            UseEmbeddedHttpServer = true
                                        };
    Store.Initialize();
}
</pre>
</li>
<li>Now in order to be able to view the RavenDB Management Studio we need to locate the file Raven.Studio.xap from the packages folder which was created when we added in the Nuget package above.
<p>The packages folder is located in the directory above the folder in which your solution currently resides, once you locate the packages folder locate the RavenDB-Embedded(version number) folder in my case this is RavenDB-Embedded.1.0.701 &#8211; the file we are looking for is in the packages\RavenDB-Embedded.1.0.701\lib\net40\ </p>
<p>Copy the Raven.Studio.xap to the root of your website and now try running your MVC website.
</li>
<li>Once that loads up now browse to http://localhost:8080 and the RavenDB Studio should load up &#8211; and that&#8217;s you.</li>
<li>If you see this:- <img src="http://gregorsuttie.files.wordpress.com/2012/03/emb4.png?w=529" alt="EmbeddedMode" />
<p>It means you havent copied the Raven.Studio.xap to the root of your website.
</ol>
<p>I hope this helps someone out.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1385/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1385&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/03/27/acessing-ravenddb-studio-when-using-embedded-mode/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/emb1.png" medium="image">
			<media:title type="html">EmbeddedMode </media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/emb2.png" medium="image">
			<media:title type="html">EmbeddedMode</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/emb3.png" medium="image">
			<media:title type="html">EmbeddedMode</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/emb4.png" medium="image">
			<media:title type="html">EmbeddedMode</media:title>
		</media:content>
	</item>
		<item>
		<title>Profiling your RavenDB MVC application</title>
		<link>http://gregorsuttie.com/2012/03/26/profiling-your-ravendb-mvc-application/</link>
		<comments>http://gregorsuttie.com/2012/03/26/profiling-your-ravendb-mvc-application/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 19:18:33 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[RavenDB]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1369</guid>
		<description><![CDATA[Your application is starting to take shape and you want to be able to quickly see what&#8217;s going on when &#8230;<p><a href="http://gregorsuttie.com/2012/03/26/profiling-your-ravendb-mvc-application/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1369&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Your application is starting to take shape and you want to be able to quickly see what&#8217;s going on when using RavenDB.</p>
<p>Step forward the in-built profiling dll which is very easy to set up and get going with, lets implement that along with MiniProfiler.</p>
<ol>
<li>Add the Nuget package MiniProfiler.RavenDb to your application</li>
<li>Add the Raven.Client.MvcIntegration dll which can be found in the Client folder when you download the source for RavenDB</li>
<li>Add the following to your global.asa.cs file:-<br />
<pre class="brush: csharp;">
protected void Application_BeginRequest()
{
    if (Request.IsLocal)
    {
        MiniProfiler.Start();
    }
}
</pre></p>
<p>and then :-</p>
<p><pre class="brush: csharp;">
protected void Application_EndRequest()
{
    MiniProfiler.Stop();
}
</pre>
</li>
<li>Add the following to your global.asa.cs file in the Application_Start event:-
<p><pre class="brush: csharp;">
Raven.Client.MvcIntegration.RavenProfiler.InitializeFor(Store);
MvcMiniProfiler.RavenDb.Profiler.AttachTo((DocumentStore)Store);
</pre></p>
</li>
<li>Lastly add the following lines into your _Layout.cshtml file in the Shared folder, under Views:-
<p><pre class="brush: csharp;">
@MvcMiniProfiler.MiniProfiler.RenderIncludes()
@Raven.Client.MvcIntegration.RavenProfiler.CurrentRequestSessions()
</pre></p>
</li>
</ol>
<p>That&#8217;s it &#8211; you have now adedd the built in profiler and MiniProfiler for RavenDB, run your application and you can<br />
see that in the top left hand corner you can view the details of whats going on in both profilers:-</p>
<p>MiniProfiler for RavenDB looks like this:-</p>
<p><img src="http://gregorsuttie.files.wordpress.com/2012/03/profiler1.png?w=529" alt="MiniProfiler" /></p>
<p>and this:-</p>
<p><img src="http://gregorsuttie.files.wordpress.com/2012/03/profiler2.png?w=529" alt="MiniProfiler 2" /></p>
<p>while with the RavenDB profiler we see something like this:-</p>
<p><img src="http://gregorsuttie.files.wordpress.com/2012/03/profiler3.png?w=529" alt="RavenDB Profiler" /></p>
<p>The in-built profiler from RavenDB shows us how long the query took, the status, result, Method, Url, Query and Actions as well as the actual request details.</p>
<p>All in all both profilers are very hand and very easy to install &#8211; go get them installed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1369/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1369/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1369/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1369&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/03/26/profiling-your-ravendb-mvc-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/profiler1.png" medium="image">
			<media:title type="html">MiniProfiler</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/profiler2.png" medium="image">
			<media:title type="html">MiniProfiler 2</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/profiler3.png" medium="image">
			<media:title type="html">RavenDB Profiler</media:title>
		</media:content>
	</item>
		<item>
		<title>RavenDB Hints and Tips</title>
		<link>http://gregorsuttie.com/2012/03/14/ravendb-hints-and-tips/</link>
		<comments>http://gregorsuttie.com/2012/03/14/ravendb-hints-and-tips/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 21:45:24 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[RavenDB]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1322</guid>
		<description><![CDATA[Here is a list of hints and tips if you&#8217;re looking for some help with RavenDB. Sign up for the &#8230;<p><a href="http://gregorsuttie.com/2012/03/14/ravendb-hints-and-tips/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1322&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img alt="RavenDB" src="http://static.ravendb.net/badges/standard/badge2.png" class="alignleft" width="165" height="72" /> Here is a list of hints and tips if you&#8217;re looking for some help with RavenDB.</p>
<p></br></p>
<ul>
<li>Sign up for the mailing list where you can see other people&#8217;s previous questions and answers to problems on the <a class="contact" href="http://groups.google.com/group/ravendb/" target="_blank">View the Google Group</a>.
</li>
<li>To make sure RavenDB doesn&#8217;t clash with routing used in MVC change the global.asa.cs file from:-
<p>{controller}/{action}/{id} to {controller}/{action}/{<strong>*</strong>id} &#8211; Note the * next to the {id} or you can do <a href="http://ravendb.net/kb/3/using-ravendb-in-an-asp-net-mvc-website" target="_blank">this</a>.</li>
<li>If I choose the Embedded version of RavenDB how do I start the server &#8211; to start the RavenDB server locate the RavenDB folder and then look for the server folder and then run Raven.Server.Exe
</li>
<li>If I install RavenDB using Nuget then what do I do, locate the packages folder which is in the folder one above the solution you&#8217;ve added it to on the file system, locate the RavenDB folder and then look for the server folder and then run Raven.Server.Exe
</li>
<li>How do you view the RavenDB Studio &#8211; easiest way is to browse to http://localhost:8080, that&#8217;s the default location of installation when you first run the Raven.Server.Exe
</li>
<li>Unit testing &#8211; how best to go about it &#8211; the recommended way to go about this is by using the EmbeddedDocumentStore<br />
which is basically all done in memory, you can set it up like this:- </p>
<p><pre class="brush: csharp;">
var documentStore = new EmbeddableDocumentStore
{
    DataDirectory = &quot;Data&quot;,
    RunInMemory = true,
    UseEmbeddedHttpServer = true
};
</pre>
</li>
<li>Good RavenDB Samples <a href="https://github.com/PureKrome/RavenOverflow" target="_Blank">RavenOverFlow</a> and <a href="https://github.com/ayende/RaccoonBlog" target="_Blank">Racoon Blog</a></li>
</ul>
<p>If your stuck with something give me a shout I&#8217;ll see if I can shed some light, I&#8217;ll be adding more tips as I learn more RavenDB.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1322/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1322/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1322/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1322&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/03/14/ravendb-hints-and-tips/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://static.ravendb.net/badges/standard/badge2.png" medium="image">
			<media:title type="html">RavenDB</media:title>
		</media:content>
	</item>
		<item>
		<title>Skillsmatter RavenDB Course Review</title>
		<link>http://gregorsuttie.com/2012/03/02/skillsmatter-ravendb-course-review/</link>
		<comments>http://gregorsuttie.com/2012/03/02/skillsmatter-ravendb-course-review/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 22:41:15 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[RavenDB]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://gregorsuttie.wordpress.com/?p=1200</guid>
		<description><![CDATA[On Feb 28th and 29th of February I attended the Skillsmatter RavenDB course in London with Itamar Syn-Hershko, course details &#8230;<p><a href="http://gregorsuttie.com/2012/03/02/skillsmatter-ravendb-course-review/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1200&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img alt="RavenDB" src="http://static.ravendb.net/badges/standard/badge1.png" class="alignleft" width="165" height="72" />On Feb 28th and 29th of February I attended the Skillsmatter RavenDB course in London with Itamar Syn-Hershko, course details <a href="http://skillsmatter.com/course/open-source-dot-net/ayende-rahiens-ravendb-workshop" target="_blank">here</a>.</p>
<p>Itamar is a developer on RavenDB and works with Oren aka Ayende from Hibernating Rhinos in Israel and this was a chance to learn from one of the guys who works on RavenDB.</p>
<p>The course was a 2 day course covering a wide range of features of RavenDB including:-</p>
<ul>
<li>Principles of RavenDB</li>
<li>Getting started with RavenDB</li>
<li>CRUD operations</li>
<li>The basics of querying</li>
<li>Advanced querying</li>
<li>Document based modeling</li>
<li>Using Includes for better performance</li>
<li>Caching and cache utilization</li>
<li>Creating static indexes</li>
<li>Map/Reduce</li>
<li>Extending RavenDB</li>
<li>Replication, Sharding &amp; Scale</li>
<li>Full text search</li>
</ul>
<p>The course covers a lot of content and you&#8217;re given exercises to do which was very useful in finding out how to properly use parts of RavenDB as well as learn how to go about a certain task the recommended way. </p>
<p>I have come away from the course with a much better understanding of the how and why and that&#8217;s the main reason why I wanted to go on the course in the first place and I cant wait to get started using RavenDB on our upcoming project.</p>
<p>From asking a number of questions about RavenDB its clear to me that RavenDB has a lot to it, there is a lot to learn about it but it has a number of great features which are very powerful and yet very simple to use, some of the things that stood out for me where the following:-</p>
<ul>
<li>Safe by default &#8211; this means that it stops the user from writing code that is requesting too much data, and limits the number of requests that each session is allowed to make.</li>
<li>Lucene &#8211; searching using Lucene provides a fantastic way to search and in Raven we can utilise the power of Lucene to even have full text search capabilities.</li>
</ul>
<p>The course itself cost £1250 and was well worth it &#8211; anyone thinking about going on the upcoming courses I would recommend it to them for definite, details on the next RavenDB course they are hosting can be found <a href="http://skillsmatter.com/course-details/nosql/ayende-rahiens-ravendb-workshop" target="_blank">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1200&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/03/02/skillsmatter-ravendb-course-review/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://static.ravendb.net/badges/standard/badge1.png" medium="image">
			<media:title type="html">RavenDB</media:title>
		</media:content>
	</item>
		<item>
		<title>Skillsmatter RavenDB Course</title>
		<link>http://gregorsuttie.com/2012/03/02/skillsmatter-ravendb-course/</link>
		<comments>http://gregorsuttie.com/2012/03/02/skillsmatter-ravendb-course/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 21:37:33 +0000</pubDate>
		<dc:creator>Gregor Suttie</dc:creator>
				<category><![CDATA[RavenDB]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://gregorsuttie.com/?p=1258</guid>
		<description><![CDATA[On the 28th and 29th Feb I attended the RavenDB Course at Skillsmatter in London, details on the next RavenDB &#8230;<p><a href="http://gregorsuttie.com/2012/03/02/skillsmatter-ravendb-course/">Continue reading &#187;</a></p><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1258&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://gregorsuttie.files.wordpress.com/2012/03/skills-matter_150x60_logo_2010.gif"><img src="http://gregorsuttie.files.wordpress.com/2012/03/skills-matter_150x60_logo_2010.gif?w=529" alt="" title="skills-matter_150x60_logo_2010"   class="alignleft size-full wp-image-1265" /></a>On the 28th and 29th Feb I attended the RavenDB Course at <a href="http://skillsmatter.com/" target="_blank">Skillsmatter</a> in London, details on the next RavenDB course they are hosting can be found <a href="http://skillsmatter.com/course-details/nosql/ayende-rahiens-ravendb-workshop" target="_blank">here</a>.</p>
<p>Skillsmatter is located in central London and very easily accessible, being a short taxi ride from Liverpool Street train station &#8211; upon arrival we were warmly welcome and asked to register and make our food choices for the first day of the course. </p>
<p>Skillsmatter is quite a fair size and has several training rooms upstairs and an area downstairs for talks and presentations, many which are given by user groups and can hold id say about 70 people (with room for more). </p>
<p>Our course took part in one of the smaller rooms which was perfect for our course, plenty of power/access points, projecter and whiteboard(s), all well laid out and just what you&#8217;d expect really.</p>
<p>The food at lunch was great and the staff there were very friendly and very helpful, really nice people. </p>
<p>On day 2 of the course we went to the pub for lunch and again everyone was very friendly and keen to ask us about how we were enjoying the course and keen to know if we were enjoying out training course.</p>
<p>For anyone looking for a great training venue or a place to hold a user group meeting in London then this would be an ideal place to go &#8211; the courses they run are great and the list of courses is very good indeed</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gregorsuttie.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gregorsuttie.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gregorsuttie.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gregorsuttie.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gregorsuttie.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gregorsuttie.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gregorsuttie.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gregorsuttie.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gregorsuttie.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gregorsuttie.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gregorsuttie.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gregorsuttie.wordpress.com/1258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gregorsuttie.wordpress.com/1258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gregorsuttie.wordpress.com/1258/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gregorsuttie.com&#038;blog=18438908&#038;post=1258&#038;subd=gregorsuttie&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gregorsuttie.com/2012/03/02/skillsmatter-ravendb-course/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/01ebf1680ef063faa3d3b5dddb999d15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gregorsuttie</media:title>
		</media:content>

		<media:content url="http://gregorsuttie.files.wordpress.com/2012/03/skills-matter_150x60_logo_2010.gif" medium="image">
			<media:title type="html">skills-matter_150x60_logo_2010</media:title>
		</media:content>
	</item>
	</channel>
</rss>
