<?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>Arrange Act Assert</title> <atom:link href="http://www.arrangeactassert.com/feed/" rel="self" type="application/rss+xml" /><link>http://www.arrangeactassert.com</link> <description>Jag Reehal on Agile Development, ASP.NET MVC and all manner of good stuff</description> <lastBuildDate>Thu, 24 Nov 2011 00:01:20 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Selling executable specifications to stakeholders, testers and developers</title><link>http://www.arrangeactassert.com/selling-executable-specifications-to-stakeholders-testers-and-developers/</link> <comments>http://www.arrangeactassert.com/selling-executable-specifications-to-stakeholders-testers-and-developers/#comments</comments> <pubDate>Thu, 24 Nov 2011 00:01:20 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[Agile]]></category> <category><![CDATA[BDD]]></category> <category><![CDATA[Specflow]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=2009</guid> <description><![CDATA[In this post I want to share how we made a breakthrough in using executable specifications in our latest project. Executable specifications are scenarios created by developers, testers and stakeholders working in collaboration that check the behaviour of a system every time code is committed. For more information and a podcast about Executable specifications check [...]]]></description> <content:encoded><![CDATA[<p>In this post I want to share how we made a breakthrough in using executable specifications in our latest project.</p><p><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/11/172.png" style="margin-right:20px" alt="Executable specifications" title="Executable specifications" width="60" height="90" class="alignleft size-full wp-image-2025" />Executable specifications are scenarios created by developers, testers and stakeholders working in collaboration that check the behaviour of a system every time code is committed.  For more information and a podcast about Executable specifications check out this <a
href="http://www.hanselman.com/blog/HanselminutesPodcast248ExecutableSpecificationsWithGojkoAdzicJonasBandiAndAslakHellesoy.aspx" title="Hanselminutes" target="_blank">Hanselminutes episode &#8216;Executable Specifications with Gojko Adzic, Jonas Bandi and Aslak Hellesoy&#8217;</a>.</p><h3 class="subheading">The need for change</h3><p>A few months ago after joining the team, there was a lot confusion how a previous project worked.</p><p>Stakeholders weren’t sure what functionality had been implemented, testers weren&#8217;t sure if everything had been tested and developers didn&#8217;t want to go anywhere near the code.</p><p>While there was a wiki no one was sure if was 100% accurate which meant it could do more harm than good because it could lead to false assumptions.</p><p>As a result of this the relationships between the groups had suffered.</p><p>Inspired by <a
href="http://skillsmatter.com/podcast/agile-testing/how-to-sell-bdd-to-the-business" title="Dan North talk" target="_blank">Dan North&#8217;s talk &#8216;How to sell BDD to the business&#8217;</a> I suggested using BDD (behavior driven development) and executable specifications to help prevent this happening in the future.</p><p>Testers and business owners were open to the idea but were skeptical to how valuable it would be.</p><p>So we decided to try it out on a small part of the project.</p><blockquote><p> And it worked!</p></blockquote><p>Working collaboratively we found relationships started to improve and there was a lot more trust between the groups.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/11/58.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/11/58.png" alt="Tick" title="It worked" width="69" height="60" style="margin-right:20px" class="alignleft size-full wp-image-2030" /></a>At the end of the project stake holders, testers and developers agreed executable specifications were an excellent way to develop software and keen to adopt the approach for other projects.</p><h3 class="subheading">So what sold executable specifications to the stakeholders, testers and developers?</h3><ul><li> Scenarios that matched the business problems the stakeholders wanted to solve.</p><p>This gave stakeholders confidence and lowered fear and resistance to change.</li><li> Easy to read scenarios that matched the domain language the stakeholders were using.</p><p>Stakeholders could relate to scenarios and therefore felt involved.</li><li> Using scenarios to fill out the blanks.</p><p>When the test team or developers found new scenarios they communicated using with stakeholders leaving out what should happen (the then step) for them to fill in.</li><li> The use of tables.</p><p>Tables allow the reader to visualise the data, reduce reputation and mean you don&#8217;t have to cram in lots of words.</p><p>For example instead of having</p><pre class="brush: xml; gutter: false; title: ; toolbar: false; notranslate">
Scenario: Submitting form with invalid password displays error
  Given I am on the registration page
  When enter the password 'a'
  And submit the form
  Then I should see the message 'Passwords must be 8 to 16 characters long and include at least one capital letter, one lower case letter, and one number'
</pre><p>and then repeating this for every permutation of invalid passwords, you can do this</p><pre class="brush: xml; gutter: false; title: ; toolbar: false; notranslate">
Scenario: Entering an invalid password displays error
  Given I am on the registration page
  When enter the password
    | a						|
	| aaaaaaaa				|
    | AAAAAAAA				|
	| aaaaAAAA				|
	| 12345678				|
	| 1234567A				|
	| 1234567a				|
	| 12345678aaaaaaaaA		|
  And submit the form
  Then I should see the message 'Passwords must be 8 to 16 characters long and include at least one capital letter, one lower case letter, and one number'
</pre><p>We found this gave us valuable input from stakeholders and testers who were able to come up with scenarios much faster than before.</li><li> Living documentation.</p><p>Running tests to ensure the scenarios still reflected the behaviour of the system after every code change meant documentation was reliable and accurate.</li></ul><h3 class="subheading">The future</h3><p>I’m pleased stakeholders, testers and developers have recognised the value of using BDD, scenarios and executable specifications.</p><p>By taking small steps, inspecting and adapting along the way, I hope that more projects I work on can adopt this approach.</p><style>li{line-height:1.4em}</style>]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/selling-executable-specifications-to-stakeholders-testers-and-developers/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Agile Retrospectives &#8211; A picture is worth a thousand words</title><link>http://www.arrangeactassert.com/agile-retrospectives-a-picture-is-worth-a-thousand-words/</link> <comments>http://www.arrangeactassert.com/agile-retrospectives-a-picture-is-worth-a-thousand-words/#comments</comments> <pubDate>Sun, 02 Oct 2011 23:30:19 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[Agile]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1999</guid> <description><![CDATA[A while back I went to Rachel Davies excellent &#8216;Inspect &#038; Adapt with Agile Retrospectives&#8216; talk about agile retrospectives at a Software East. One thing that has stuck in my head ever since has been her tip about getting people to draw a picture to represent how the sprint went. The fact that it&#8217;s simple [...]]]></description> <content:encoded><![CDATA[<p>A while back I went to Rachel Davies excellent &#8216;<a
href="http://softwareast.ning.com/events/inspect-adapt-with-agile" title="inspect adapt with agile" target="_blank">Inspect &#038; Adapt with Agile Retrospectives</a>&#8216; talk about agile retrospectives at a Software East.</p><p>One thing that has stuck in my head ever since has been her tip about getting people to draw a picture to represent how the sprint went.</p><p>The fact that it&#8217;s simple and easy to do is what makes it&#8217;s great.</p><p>She gave two examples, one was a group of people climbing half way up a very steep mountain and the other was a stretched limousine packed full of people without a driver.</p><p>This is definitely worth trying out in your retrospectives becuase it&#8217;s an excellent way to lighten the mood and get people contributing.</p><p>Whether you decide to keep it anonymous or not is up to you.</p><p>Here&#8217;s a drawing I&#8217;ve shown in a retrospective.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/10/leveloftechnicaldebt.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/10/leveloftechnicaldebt.png" alt="" title="level of technical debt" width="620" height="351" class="aligncenter size-full wp-image-2000" /></a></p> ]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/agile-retrospectives-a-picture-is-worth-a-thousand-words/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Agile Parenting</title><link>http://www.arrangeactassert.com/agile-parenting/</link> <comments>http://www.arrangeactassert.com/agile-parenting/#comments</comments> <pubDate>Tue, 20 Sep 2011 06:18:43 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[Agile]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1988</guid> <description><![CDATA[Earlier this year my wife gave birth to our first child, as shown below Since that day I&#8217;ve noticed that parenting shares many similarities with agile development. I say this becuase from the moment a baby enters the world it&#8217;s all about inspect and adapt. You&#8217;re forever analysing what they&#8217;re doing, checking they&#8217;re alright and [...]]]></description> <content:encoded><![CDATA[<p>Earlier this year my wife gave birth to our first child, as shown below <img
src='http://www.arrangeactassert.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><p><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/09/family.png" alt="" title="Family" width="259" height="104" class="aligncenter size-full wp-image-1990" /></p><p>Since that day I&#8217;ve noticed that parenting shares many similarities with agile development.</p><p>I say this becuase from the moment a baby enters the world it&#8217;s all about inspect and adapt.</p><p>You&#8217;re forever analysing what they&#8217;re doing, checking they&#8217;re alright and planning and pirotising what to do next.</p><p>And while friends, parents and books give sound advice you have to look at your own context, every baby is different and so not every tip will work.</p><p>And this is when you&#8217;ll start doing mini retrospecives as parents.  Every so often you&#8217;ll sit down with your partner discuss what went well, what didn&#8217;t and what to try next.</p><p>Using short feedback cycles you&#8217;ll soon work out what works best with the aim of developing sort form of structure.</p><p>You can&#8217;t do this waterfall becuase babies are unpredicatble and constantly changing.</p><p>As soon as you think you sussed it and plan too far ahead, the baby will go thru a growth spurt or learn something new and you&#8217;re back to square one before you know it.</p><p>It&#8217;s like a game of snakes and ladders, you&#8217;ll look at your partner and say this didn&#8217;t happen yesterday.</p><p>We&#8217;re four months in by working together and constantly sharing throughts and ideas we&#8217;re developing a routine which can cope with changes and&#8230; getting more sleep as each week passes!</p> ]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/agile-parenting/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Why I use the NHibernate Profiler for optimal ORM performance</title><link>http://www.arrangeactassert.com/why-i-use-the-nhibernate-profiler-for-optimal-orm-performance/</link> <comments>http://www.arrangeactassert.com/why-i-use-the-nhibernate-profiler-for-optimal-orm-performance/#comments</comments> <pubDate>Mon, 05 Sep 2011 23:01:41 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[Entity Framework]]></category> <category><![CDATA[NHibernate]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1960</guid> <description><![CDATA[In this post I want to show how the NHibernate Profiler can help you avoid ORM performance issues as discussed in the post &#8216;ORMs don’t kill databases. Developers do.&#8216;. While it&#8217;s not open source it&#8217;s definitely worth the investment if you use NHibernate because it can give you alerts about any potential issues and information [...]]]></description> <content:encoded><![CDATA[<p>In this post I want to show how the <a
href="http://nhprof.com/" title="NHibernate Profiler">NHibernate Profiler</a> can help you avoid ORM performance issues as discussed in the post &#8216;<a
href="http://www.arrangeactassert.com/orms-dont-kill-databases-developers-do/" title="ORMs don’t kill databases.  Developers do.">ORMs don’t kill databases. Developers do.</a>&#8216;.</p><p>While it&#8217;s not open source it&#8217;s definitely worth the investment if you use NHibernate because it can give you alerts about any potential issues and information about how to resolve them.</p><p>Something that a profiling tool like SQL Profiler just can&#8217;t do.</p><p>For example by running the code below to insert 200 apples and then retrieve them from the database</p><blockquote><p>Note: this code is meant to be written like this to generate alerts</p></blockquote><pre class="brush: csharp; gutter: true; title: ; toolbar: true; notranslate">
[Test]
public void NHibernate_Profiler_Demo()
{
    using (IStatelessSession session = FruitDatabase.SessionFactory.OpenStatelessSession())
    {
        using (ITransaction txn = session.BeginTransaction(IsolationLevel.ReadCommitted))
        {
            for (int i = 0; i &lt; 200; i++)
            {
                var apple = new Fruit() { Name = &quot;Apple&quot; };
                session.Insert(apple);
            }
            txn.Commit();
        }
    }
    using (IStatelessSession session = FruitDatabase.SessionFactory.OpenStatelessSession())
    {
            var results = session.Query&lt;Fruit&gt;().ToList();
    }
}
</pre><p>the NHibernate Profiler gives a warning about the &#8216;large number of individual writes&#8217; and a suggestion about having &#8216;too many database calls per session&#8217;.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/09/write.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/09/write.png" alt="" title="NHibernate Profiler Write Alert" width="700" height="433" class="aligncenter size-full wp-image-1963" /></a></p><p>As you can see in the screenshot there are links to read more which takes you to a takes you to a page with helpful tips to resolve issue and a link to ignore the alert (not recommended!).</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/09/nhinfo.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/09/nhinfo.png" alt="" title="NHibernate Info" width="700" height="487" class="aligncenter size-full wp-image-1965" /></a></p><p>This isn&#8217;t the only alert that is raised when writing, so you should repeat the cycle of test and fix until no further alerts are raised, the queries/execution plan and/or code have been optimized e.g. changing how/where identifiers are created.</p><h3 class="subheading">NHibernate Profiler alerts about reads</h3><p>In addition to detecting problems when writing data the NHibernate profiler can give you tips when reading data.</p><p>For the example in this post there are alerts for an unbounded result set and an implicit transaction. Again these probably won&#8217;t be the only alerts raised.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/09/read.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/09/read.png" alt="" title="NHibernate Profiler Read Alert" width="700" height="433" class="aligncenter size-full wp-image-1964" /></a></p><p>Additional features in the NHibernate Profiler include being able to see the result of the query and the execution plan, the ability to compare sessions and a general overview of how an application is interacting with a database.</p><p>Check out this <a
href="http://nhprof.com/ReportExport.html" title="NH Profiler Demo">live HTML Demo</a> to give it a test run.</p><p>There are also versions available for other ORMs like <a
href="http://efprof.com/" title="Entity Framework Profiler">Entity Framework</a>, unfortunately you&#8217;ll have to buy a separate licence for each one.</p><p>So while you could write your own solution to log and analyse interactions between your app and the database, the NHibernate Profiler will save you so much time because it can do the investigative work for you.</p> ]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/why-i-use-the-nhibernate-profiler-for-optimal-orm-performance/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ORMs don’t kill databases.  Developers do.</title><link>http://www.arrangeactassert.com/orms-dont-kill-databases-developers-do/</link> <comments>http://www.arrangeactassert.com/orms-dont-kill-databases-developers-do/#comments</comments> <pubDate>Tue, 23 Aug 2011 23:01:24 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[Entity Framework]]></category> <category><![CDATA[NHibernate]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1932</guid> <description><![CDATA[Following a recent post I wrote Phillip Haydon made an excellent argument about not using LINQ in ORMs like nHibernate and Entity Framework without consideration to what they are doing. Something I definitely agree with. Just as guns don’t kill people, ORMs don’t kill databases. Developers do. I should have picked up on this because [...]]]></description> <content:encoded><![CDATA[<p>Following a recent post I wrote <a
href="http://www.philliphaydon.com/2011/08/nhibernate-work-around-is-not-really-a-work-around/" rel="nofollow">Phillip Haydon</a> made an excellent argument about not using LINQ in ORMs like nHibernate and Entity Framework without consideration to what they are doing.</p><p>Something I definitely agree with.</p><blockquote><p>Just as guns don’t kill people, ORMs don’t kill databases.  Developers do.</p></blockquote><div
id="image-text"><p>I should have picked up on this because it’s happened to me on a project I was working on.<br
/> <img
width="100" height="100" src="http://www.arrangeactassert.com/wp-content/uploads/2011/08/tombstone.jpg" alt="Death by ORM" title="tombstone" class="alignleft size-full wp-image-1945" style="margin-right:5px"/><br
/> During development everything was performing well.  So well that even the most sceptical developers decided to use ORMs instead of stored procedures.<br
/> </br>The application was responsive and users were happy.<br
/> </br>However in production there has no happy ending.  The application went from running like <a
href="http://onlineslangdictionary.com/meaning-of/like-shit-off-a-shovel">sh!t off a proverbial shovel</a> to just sh!t.</p></div><p>It was a nightmare and the finger pointing began.</p><p>The problem was we assumed (always a bad thing) the queries generated by the ORM would be as good as if we had written them ourselves.</p><p>So when we looked at what was being generated it came as a bit of a shock to see what was going on.</p><p>But while it was easy to use the ORM as a scapegoat the reality was developers were at fault.</p><p>Here&#8217;s a simple example of how even the smallest of changes can make a difference in the SQL ORMs generate.</p><p>In the code below all we want nHibernate to do is select the of the fruit that is NOT also a color.</p><pre class="brush: csharp; gutter: true; title: ; toolbar: true; notranslate">
[Test]
public void Tale_Of_Two_Queries()
{
    var fruitDatabase = new FruitDatabase();
    using (ISession session = fruitDatabase.Session)
    {
        using (ITransaction txn = session.BeginTransaction())
        {

            var apple = new Fruit() { Name = &quot;Apple&quot;, IsAlsoAColor = false};
            var orange = new Fruit() { Name = &quot;Orange&quot;, IsAlsoAColor = true };

            session.Save(apple);
            session.Save(orange);
            txn.Commit();
        }

        var firstQuery = session.Query&lt;Fruit&gt;()
        .Where(f =&gt; !f.IsAlsoAColor)
        .Select(f =&gt; f.Name)
        .ToList();        

        var secondQuery = session.Query&lt;Fruit&gt;()
                .Where(f =&gt; f.IsAlsoAColor == false)
                .Select(f =&gt; f.Name)
                .ToList();
    }
}
</pre><p>For the query that uses !f.IsAlsoAColor the SQL query looks like this</p><pre class="brush: sql; gutter: true; title: ; toolbar: true; notranslate">
select fruit0_.Name as col_0_0_
from   Fruits fruit0_
where  not (fruit0_.IsAlsoAColor = 1)
</pre><p>For the query that uses f.IsAlsoAColor == false the sql generated looks like this</p><pre class="brush: sql; gutter: true; title: ; toolbar: true; notranslate">
select fruit0_.Name as col_0_0_
from   Fruits fruit0_
where  case
         when fruit0_.IsAlsoAColor = 1 then 1
         else 0
       end = case
               when 0 /* @p0 */ = 1 then 1
               else 0
             end
</pre><p>While this is a trivial example it highlights the fact you don&#8217;t know what the generated SQL will be, let alone the execution plan.</p><p>And if your query returns the results you want are you really going to spend time finding out what’s going on ‘under the hood’?</p><h3 class="subheading">How comes nobody talks about this?</h3><p>I can&#8217;t ever recall a presenter warning about this during any ORM talk I&#8217;ve been to.  The focus always on what it can do and how it compares to other ORMs rather than best practices.</p><h3 class="subheading">It&#8217;s not just a .Net problem either</h3><p>After talking to Ruby on Rails developers this is a problem for them too, because Active Record doesn&#8217;t work 100% of the time.  When it goes wrong they have to implement workarounds to execute queries without using active record.</p><h3 class="subheading">So how can I make sure it doesn&#8217;t happen to me?</h3><p>The first thing is to know what issues to look out for.  The <a
href="http://nhprof.com/Learn/Alerts">nHibernate profiler alerts page</a> is an excellent resource for this.</p><p>With this information you can use profiling tools to see what queries your ORM is generating and how your application is performing.</p><p>My last tip is to always use the best data access method for what you’re doing.  It’s easy to become complacent or aim to everything using an ORM, but if it makes more sense to use a stored procedure then that’s what you should do.</p><p>It would be good to hear what your experiences are with issues like this and to share any tips/tools you have used to avoid ORM performance issues.</p><p>In the meantime I’ll leave you with this excellent DBA vs. Developer (Star Wars Style) video</p><p><iframe
width="420" height="345" src="http://www.youtube.com/embed/P0v3ntSxxYs" frameborder="0" allowfullscreen></iframe></p> ]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/orms-dont-kill-databases-developers-do/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>nHibernate LINQ workaround for System.NotSupportedException</title><link>http://www.arrangeactassert.com/nhibernate-linq-workaround-for-system-notsupportedexception/</link> <comments>http://www.arrangeactassert.com/nhibernate-linq-workaround-for-system-notsupportedexception/#comments</comments> <pubDate>Thu, 11 Aug 2011 23:01:38 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[NHibernate]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1911</guid> <description><![CDATA[In this post we&#8217;ll see a workaround for writing a nHibernate LINQ query that does a join using an in-memory collection. Why would you want to do this? Lets say to find out about nutritional information about fruits users clicked the relevant check boxes and press the button to submit the form e.g. Back on [...]]]></description> <content:encoded><![CDATA[<p>In this post we&#8217;ll see a workaround for writing a nHibernate LINQ query that does a join using an in-memory collection.</p><h3 class="subheading">Why would you want to do this?<br
/></h3><p>Lets say to find out about nutritional information about fruits users clicked the relevant check boxes and press the button to submit the form e.g.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/mockup.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/mockup.png" alt="" title="choose fruit mockup" width="450" height="400" class="aligncenter size-full wp-image-1929" /></a></p><p>Back on the server we need to get nutritional information for each fruit selected.</p><p>To get this information we could write a nHibernate LINQ query like this</p><pre class="brush: csharp; gutter: true; highlight: [25,26,27,28]; title: ; toolbar: true; notranslate">
[Test]
public void Getting_Fruits_Using_LINQ_Query()
{
    var fruitIds = new List&lt;int&gt;() { 2, 3 };

    var fruitDatabase = new FruitDatabase();
    using (ISession session = fruitDatabase.Session)
    {
        using (ITransaction txn = session.BeginTransaction())
        {
            // Arrange
            var apple = new Fruit() { Id = 1, Name = &quot;Apple&quot;, NutritionalInformation = &quot;An apple a day&quot; };
            var banana = new Fruit() { Id = 2, Name = &quot;Banana&quot;, NutritionalInformation = &quot;Energy Boost&quot; };
            var orange = new Fruit() { Id = 3, Name = &quot;Orange&quot;, NutritionalInformation = &quot;Lots of Vitamin C&quot; };
            var pear = new Fruit() { Id = 3, Name = &quot;Pear&quot;, NutritionalInformation = &quot;It's green&quot; };

            session.Save(apple);
            session.Save(banana);
            session.Save(orange);
            session.Save(pear);
            txn.Commit();
        }

        // Act
        var result = (from f in session.Query&lt;Fruit&gt;()
                        join i in fruitIds
                            on f.Id equals i
                        select f).ToList();

        // Assert
        Assert.IsFalse(result.Exists(f =&gt; f.Name == &quot;Apple&quot;));
        Assert.IsTrue(result.Exists(f =&gt; f.Name == &quot;Banana&quot;));
        Assert.IsTrue(result.Exists(f =&gt; f.Name == &quot;Orange&quot;));
        Assert.IsFalse(result.Exists(f =&gt; f.Name == &quot;Pear&quot;));
    }
}
</pre><p>but doing so gives us the following error</p><blockquote><p>System.NotSupportedException : Specified method is not supported.</p></blockquote><p>However if we wrote the query like this the join works as expected</p><pre class="brush: csharp; gutter: true; highlight: [25,26,27]; title: ; toolbar: true; notranslate">
[Test]
public void Getting_Fruits_Using_LINQ_Query()
{
    var fruitIds = new List&lt;int&gt;() { 2, 3 };

    var fruitDatabase = new FruitDatabase();
    using (ISession session = fruitDatabase.Session)
    {
        using (ITransaction txn = session.BeginTransaction())
        {
            // Arrange
            var apple = new Fruit() { Id = 1, Name = &quot;Apple&quot;, NutritionalInformation = &quot;An apple a day&quot; };
            var banana = new Fruit() { Id = 2, Name = &quot;Banana&quot;, NutritionalInformation = &quot;Energy Boost&quot; };
            var orange = new Fruit() { Id = 3, Name = &quot;Orange&quot;, NutritionalInformation = &quot;Lots of Vitamin C&quot; };
            var pear = new Fruit() { Id = 3, Name = &quot;Pear&quot;, NutritionalInformation = &quot;It's green&quot; };

            session.Save(apple);
            session.Save(banana);
            session.Save(orange);
            session.Save(pear);
            txn.Commit();
        }

        // Act
     var result = session.Query&lt;Fruit&gt;()
                .Where(f =&gt; fruitIds.Contains(f.Id))
                .ToList();

        // Assert
        Assert.IsFalse(result.Exists(f =&gt; f.Name == &quot;Apple&quot;));
        Assert.IsTrue(result.Exists(f =&gt; f.Name == &quot;Banana&quot;));
        Assert.IsTrue(result.Exists(f =&gt; f.Name == &quot;Orange&quot;));
        Assert.IsFalse(result.Exists(f =&gt; f.Name == &quot;Pear&quot;));
    }
}
</pre><p>For which the SQL generated by nHibernate looks like this</p><pre class="brush: sql; title: ; notranslate">
select fruit0_.Id                     		as Id1_,
       fruit0_.Name                   		as Name1_,
       fruit0_.NutritionalInformation 	as Nutritio3_1_
from   Fruits fruit0_
where  fruit0_.Id in (2 /* @p0 */,3 /* @p1 */)
</pre>]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/nhibernate-linq-workaround-for-system-notsupportedexception/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>How to deploy ASP.NET MVC applications to AppHarbor</title><link>http://www.arrangeactassert.com/how-to-deploy-asp-net-mvc-applications-to-appharbor/</link> <comments>http://www.arrangeactassert.com/how-to-deploy-asp-net-mvc-applications-to-appharbor/#comments</comments> <pubDate>Wed, 13 Apr 2011 01:59:46 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[AppHarbor]]></category> <category><![CDATA[Asp.Net MVC]]></category> <category><![CDATA[Entity Framework]]></category> <category><![CDATA[Git]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1785</guid> <description><![CDATA[I’ve already blogged about how awesome AppHarbor is. So to back up my opinion I’ve decided to write a tutorial about how to deploy an ASP.NET MVC application to AppHarbor. The application we’ll be deploying will be the ASP.NET MVC Music Store (created by James Senior, Jon Galloway and Scott Hanselman) which uses ASP.NET MVC [...]]]></description> <content:encoded><![CDATA[<p>I’ve already blogged about <a
href="http://www.arrangeactassert.com/why-im-using-appharbor-to-host-my-asp-net-mvc-sites/">how awesome AppHarbor</a> is.</p><p>So to back up my opinion I’ve decided to write a tutorial about how to deploy an <a
href="http://www.asp.net/mvc">ASP.NET MVC</a> application to <a
href="http://appharbor.com/">AppHarbor</a>.</p><p>The application we’ll be deploying will be the <a
href="http://mvcmusicstore.codeplex.com">ASP.NET MVC Music Store</a> (created by <a
href="http://twitter.com/jsenior">James Senior</a>, <a
href="http://twitter.com/jongalloway">Jon Galloway</a> and <a
href="http://twitter.com/shanselman">Scott Hanselman</a>) which uses ASP.NET MVC 3 with Razor syntax and data access via <a
href="http://msdn.microsoft.com/en-us/data/aa937723">Entity Framework 4</a>.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/ASPNETMVCMusicStoreHomepage.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/ASPNETMVCMusicStoreHomepage.png" alt="ASP.NET MVC MusicStore Homepage" title="ASP.NET MVC MusicStore Homepage" width="690" height="339" class="aligncenter size-full wp-image-1805" /></a></p><p><a
href="http://mvcmusicstoredemo.apphb.com/">Click here</a> to a deployed version of the ASP.NET MVC Music Store running on AppHarbor.</p><p>To follow along with the tutorial you’ll need to have the following installed:</p><ul><li><a
href="http://www.microsoft.com/express/Web/">Visual Web Developer 2010 Express</a> or <a
href="http://www.microsoft.com/visualstudio/">Visual Studio 2010</a></li><li><a
href="http://www.microsoft.com/express/Web/">SQL Server 2008 Express</a> or <a
href="http://www.microsoft.com/sqlserver/2008">SQL Server 2008</a></li><li><a
href="http://www.asp.net/mvc/mvc3">ASP.NET MVC 3</a></li><li><a
href="http://code.google.com/p/msysgit/">Git</a> (<a
href="http://help.github.com/win-set-up-git/">use this guide to help you install</a>)</li><li><a
href="http://mvcmusicstore.codeplex.com">A downloaded an unzipped version of the ASP.NET MVC Music Store</a></li></ul><p>If you&#8217;re also going to use the ASP.NET MVC Music Store please ensure you change the ..\Views\Shared\_Layout.cshtml to include HTML to indicate the site is a sample available from codeplex and a noindex robots meta tag.</p><pre class="brush: xml; gutter: true; highlight: [4,5,12,13,14]; title: ; toolbar: true; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;meta name=&quot;robots&quot; content=&quot;noindex,nofollow&quot; /&gt;
    &lt;title&gt;This is a ASP.NET MVC sample application which can be downloaded at http://mvcmusicstore.codeplex.com&lt;/title&gt;
    &lt;link href=&quot;@Url.Content(&quot;~/Content/Site.css&quot;)&quot; rel=&quot;stylesheet&quot;
        type=&quot;text/css&quot; /&gt;
    &lt;script src=&quot;@Url.Content(&quot;~/Scripts/jquery-1.4.4.min.js&quot;)&quot;
        type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
 &lt;p style=&quot;padding:20px;background-color:#000;color:#FFF;text-align:center&quot;&gt;
        This is a ASP.NET MVC sample application which can be downloaded at &lt;a href=&quot;http://mvcmusicstore.codeplex.com&quot;&gt;http://mvcmusicstore.codeplex.com&lt;/a&gt;
    &lt;/p&gt;
    &lt;div id=&quot;header&quot;&gt;
        &lt;h1&gt;
            &lt;a href=&quot;/&quot;&gt;ASP.NET MVC MUSIC STORE&lt;/a&gt;
        &lt;/h1&gt;
       &lt;ul id=&quot;navlist&quot;&gt;
           &lt;li class=&quot;first&quot;&gt;&lt;a href=&quot;@Url.Content(&quot;~&quot;)&quot; id=&quot;current&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;&lt;a href=&quot;@Url.Content(&quot;~/Store/&quot;)&quot;&gt;Store&lt;/a&gt;&lt;/li&gt;
           &lt;li&gt;@{Html.RenderAction(&quot;CartSummary&quot;, &quot;ShoppingCart&quot;);}&lt;/li&gt;
           &lt;li&gt;&lt;a href=&quot;@Url.Content(&quot;~/StoreManager/&quot;)&quot;&gt;Admin&lt;/a&gt;&lt;/li&gt;
       &lt;/ul&gt;
    &lt;/div&gt;
    @{Html.RenderAction(&quot;GenreMenu&quot;, &quot;Store&quot;);}
    &lt;div id=&quot;main&quot;&gt;
        @RenderBody()
    &lt;/div&gt;
    &lt;div id=&quot;footer&quot;&gt;
        built with &lt;a href=&quot;http://asp.net/mvc&quot;&gt;ASP.NET MVC 3&lt;/a&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre><h3 class="subheading">Let&#8217;s get started</h3><style type="text/css">#steps{padding:0
0 0 18px;color:#008000}#steps
li{margin-bottom:10px}</style><ol
id="steps"><li> <a
href="http://www.arrangeactassert.com/how-to-add-a-asp-net-mvc-solution-to-a-git-repository">How to add a ASP.NET MVC solution to a Git repository</a></li><li><a
href="http://www.arrangeactassert.com/how-to-push-a-asp-net-mvc-git-repository-to-appharbor">How to push a ASP.NET MVC Git repository to AppHarbor</a></li><li><a
href="http://www.arrangeactassert.com/how-to-create-a-sql-server-database-in-appharbor">How To Create a SQL Server Database in AppHarbor</a></li><li><a
href="http://www.arrangeactassert.com/how-to-configure-asp-net-mvc-to-use-a-sql-server-database-in-appharbor">How to configure ASP.NET MVC to use a SQL Server database in AppHarbor</a></li></ol><h3 class="subheading">I can browse around the store and add things to my cart but can’t log in as an administrator</h3><p>That’s because you can only have one database per application&#8230; something I didn’t know when I started this series.</p><p>As AppHarbor doesn’t support file storage (yet) you can’t use the ASPDBNET.MDF database which the music store uses for ASP.NET Membership. <a
href="http://support.appharbor.com/discussions/problems/379-app_data-copy-on-new-deploy">See this AppHarbor support entry for more details</a>.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/OnlyOneAppHarborDatabaseIsAllowed.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/OnlyOneAppHarborDatabaseIsAllowed.png" alt="Only One AppHarbor Database Is Allowed" title="Only One AppHarbor Database Is Allowed" width="558" height="107" class="alignleft size-full wp-image-1909" /></a></p><p><br/><br
/> You can of course workaround this by adding membership tables etc. to the existing SQL Server database by via an alternative membership provider which includes using another application hosted on AppHarbor.</p> ]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/how-to-deploy-asp-net-mvc-applications-to-appharbor/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How to add a ASP.NET MVC solution to a Git repository</title><link>http://www.arrangeactassert.com/how-to-add-a-asp-net-mvc-solution-to-a-git-repository/</link> <comments>http://www.arrangeactassert.com/how-to-add-a-asp-net-mvc-solution-to-a-git-repository/#comments</comments> <pubDate>Wed, 13 Apr 2011 01:59:05 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[AppHarbor]]></category> <category><![CDATA[Asp.Net MVC]]></category> <category><![CDATA[Git]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1789</guid> <description><![CDATA[In this tutorial we’ll be looking at how to add a ASP.NET MVC solution to a Git repository. This tutorial is part of a series about how to deploy ASP.NET MVC applications to AppHarbor. If you haven’t installed Git yet use this guide to get you started. Before you initialize you git repository it’s a [...]]]></description> <content:encoded><![CDATA[<p>In this tutorial we’ll be looking at how to add a ASP.NET MVC solution to a Git repository.</p><p>This tutorial is part of a series about <a
href="http://www.arrangeactassert.com/how-to-deploy-asp-net-mvc-applications-to-appharbor">how to deploy ASP.NET MVC applications to AppHarbor</a>.</p><p>If you haven’t installed Git yet use this <a
href="http://progit.org/book/ch1-3.html">guide</a> to get you started.</p><p>Before you initialize you git repository it’s a good idea to have a .gitignore file in root of the repository which instructs Git what files to ignore.</p><p>As you can see in the example below it excludes things which you don’t need to version control such as output directories and anything created by ReSharper.</p><pre class="brush: xml; gutter: false; title: ; toolbar: true; notranslate">
*git
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
</pre><p>In the directory containing your ASP.NET MVC solution, right click and start Git Bash, or start Git Bash and navigate to the directory.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/GitDirectoryLocation.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/GitDirectoryLocation.png" alt="Git Directory Location" title="Git Directory Location" width="690" height="643" class="aligncenter size-full wp-image-1814" /></a></p><p>If this is the first time you’re using Git I recommended executing the following commands to set your user name and email address in the git.config which are used to track commits in the Git repository.</p><pre class="brush: csharp; gutter: false; title: ; toolbar: true; notranslate">
git config --global user.name jagreehal
git config --global user.email jag.reehal@gmail.com
</pre><p>To initialise a repository execute the following command</p><pre class="brush: csharp; gutter: false; title: ; toolbar: true; notranslate">
git init
</pre><p>Because we’ve used a gitignore file we can use the following Git command to add all files in the directory (and sub directories) into the repository.</p><pre class="brush: csharp; gutter: false; title: ; toolbar: true; notranslate">
git add .
</pre><p>Alternatively you could have added each file individually like this (for those who want total control)</p><pre class="brush: csharp; gutter: false; title: ; toolbar: true; notranslate">
git add &lt;filename&gt;
</pre><p>The final step is to commit your changes.  The –m option allows you to add a message (otherwise you’ll be promoted for one)</p><pre class="brush: csharp; gutter: false; title: ; toolbar: true; notranslate">
git commit -m &quot;Initial commit&quot;
</pre><p>In the next part of the series we’ll be looking at <a
href="http://www.arrangeactassert.com/how-to-push-a-asp-net-mvc-git-repository-to-appharbor">how to push your ASP.NET MVC Git repository to AppHarbor</a>.</p> ]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/how-to-add-a-asp-net-mvc-solution-to-a-git-repository/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to push a ASP.NET MVC Git repository to AppHarbor</title><link>http://www.arrangeactassert.com/how-to-push-a-asp-net-mvc-git-repository-to-appharbor/</link> <comments>http://www.arrangeactassert.com/how-to-push-a-asp-net-mvc-git-repository-to-appharbor/#comments</comments> <pubDate>Wed, 13 Apr 2011 01:58:52 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[AppHarbor]]></category> <category><![CDATA[Asp.Net MVC]]></category> <category><![CDATA[Git]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1801</guid> <description><![CDATA[In this tutorial I’ll be showing you how to push a Git repository for a .NET solution site to AppHarbor. This follows on from the tutorial for adding a ASP.NET MVC solution to a Git repository. The first steps are to create an AppHarbor account if you haven’t got one, and then create an application [...]]]></description> <content:encoded><![CDATA[<p>In this tutorial I’ll be showing you how to push a Git repository for a .NET solution site to AppHarbor.</p><p>This follows on from the tutorial for <a
href="http://www.arrangeactassert.com/how-to-add-a-asp-net-mvc-solution-to-a-git-repository">adding a ASP.NET MVC solution to a Git repository.</a></p><p>The first steps are to create an AppHarbor account if you haven’t got one, and then create an application</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/CreateAppHarborApp.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/CreateAppHarborApp.png" alt="Create AppHarbor App" title="Create AppHarbor App" width="353" height="339" class="alignleft size-full wp-image-1818" /></a></p><p><br/><br
/> on the following page keep a note of the URLs where you’ll be pushing your Git repository to</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/AppHarborURLs.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/AppHarborURLs.png" alt="App Harbor URLs" title="App Harbor URLs" width="690" height="563" class="alignleft size-full wp-image-1819" /></a></p><p><br/><br
/> In the directory containing your ASP.NET MVC solution start Git Bash, or start Git Bash and navigate to the directory.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/GitDirectoryLocationToPush.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/GitDirectoryLocationToPush.png" alt="Git Directory Location To Push" title="Git Directory Location To Push" width="660" height="685" class="alignleft size-full wp-image-1826" /></a></p><p><br/><br
/> Execute the following commands (substituting your URLs) to push your ASP.NET MVC solution to AppHarbor.</p><pre class="brush: csharp; gutter: false; title: ; toolbar: true; notranslate">
git remote add appharbor https://jagreehal@appharbor.com/MvcMusicStoreDemo.git
git push appharbor master
</pre><p>When you’re prompted to enter your password, use the same one for your AppHarbor account.</p><p>Next go to the build page on AppHarbor to see the status of your app.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/AppHarborBuild.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/AppHarborBuild.png" alt="App Harbor Build" title="App Harbor Build" width="690" height="532" class="alignleft size-full wp-image-1823" /></a></p><p><br/><br
/> If you’re following along with the example to deploy the ASP.NET MVC Music Store to AppHarbor you’ll see the site doesn’t work yet.</p><p>That’s because you can’t use MDF database files in AppHarbor yet so the next step is <a
href=" http://www.arrangeactassert.com/how-to-create-a-sql-server-database-in-appharbor">create the ASP.NET MVC Music Store SQL Server database in AppHarbor</a>.</p> ]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/how-to-push-a-asp-net-mvc-git-repository-to-appharbor/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How To Create a SQL Server Database in AppHarbor</title><link>http://www.arrangeactassert.com/how-to-create-a-sql-server-database-in-appharbor/</link> <comments>http://www.arrangeactassert.com/how-to-create-a-sql-server-database-in-appharbor/#comments</comments> <pubDate>Wed, 13 Apr 2011 01:58:31 +0000</pubDate> <dc:creator>Jag Reehal</dc:creator> <category><![CDATA[AppHarbor]]></category> <category><![CDATA[Asp.Net MVC]]></category> <category><![CDATA[Entity Framework]]></category><guid
isPermaLink="false">http://www.arrangeactassert.com/?p=1829</guid> <description><![CDATA[In the last part of the tutorial about how to deploy ASP.NET MVC applications to AppHarbor we pushed an ASP.NET MVC site to AppHarbor. Although the build was successful an error occured when viewing the site becuase it couldn’t connect to the attached database. To fix this we need to create a SQL Server Database [...]]]></description> <content:encoded><![CDATA[<p>In the last part of the tutorial about <a
href="http://www.arrangeactassert.com/how-to-deploy-asp-net-mvc-applications-to-appharbor">how to deploy ASP.NET MVC applications to AppHarbor</a> we <a
href="http://www.arrangeactassert.com/how-to-push-a-asp-net-mvc-git-repository-to-appharbor">pushed an ASP.NET MVC site to AppHarbor</a>.</p><p>Although the build was successful an error occured when viewing the site becuase it couldn’t connect to the attached database.</p><p>To fix this we need to create a SQL Server Database in Appharbor.</p><p>On the AppHarbor application management page click the link to &#8216;Add database&#8217;</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/AppHarborBuild.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/AppHarborBuild.png" alt="App Harbor Build" title="App Harbor Build" width="690" height="532" class="alignleft size-full wp-image-1823" /></a><br
/> <br/></p><p>Next choose SQL Server as the database type, enter a connection string name and click the create button.</p><p>I used the same connection string name used by Entity Framework 4 in the ASP.NET MVC Music Store application.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/NewAppHarborDatabase.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/NewAppHarborDatabase.png" alt="New AppHarbor Database" title="New AppHarbor Database" width="670" height="602" class="alignleft size-full wp-image-1830" /></a></p><p><br/><br
/> The following screen shows you what connection string should be used in your config file and information about how to connect to the Appharbor database from Microsoft SQL Server Managemnt Studio.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/DatabaseConnectionSettings.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/DatabaseConnectionSettings.png" alt="Database Connection Settings" title="Database Connection Settings" width="690" height="657" class="alignleft size-full wp-image-1831" /></a></p><p><br/><br
/> When you connect to the database in Microsoft SQL Server Managemnt Studio you’ll see the database is empty.</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/EmptyAppHarborDatabase.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/EmptyAppHarborDatabase.png" alt="Empty AppHarbor Database" title="Empty AppHarbor Database" width="361" height="475" class="alignleft size-full wp-image-1832" /></a></p><p><br/><br
/> In the Assets/Data folder in the ASP.NET MVC Music Store you’ll find a ‘MvcMusicStore-Create.sql’ SQL script which can be used to create and populate the tables required by the application.</p><p>Before running the script delete the first line that looks like this</p><pre class="brush: sql; gutter: false; title: ; toolbar: true; notranslate">
USE [C:\USERS\JON\DOCUMENTS\JON-SHARE\MVCMUSICSTORE-MVC3\MVCMUSICSTORE\MVCMUSICSTORE\APP_DATA\MVCMUSICSTORE.MDF]
</pre><p>When the script has been completed successfully the tables will have been created and populated</p><p><a
href="http://www.arrangeactassert.com/wp-content/uploads/2011/04/PopulatedAppHarborDatabase.png"><img
src="http://www.arrangeactassert.com/wp-content/uploads/2011/04/PopulatedAppHarborDatabase.png" alt="Populated AppHarbor Database" title="Populated AppHarbor Database" width="660" height="715" class="alignleft size-full wp-image-1833" /></a></p><p><br/><br
/> In the next step of this tutorial we will see <a
href=" http://www.arrangeactassert.com/how-to-configure-asp-net-mvc-to-use-a-sql-server-database-in-appharbor">how to configure ASP.NET MVC to use a SQL Server database in AppHarbor</a>.</p> ]]></content:encoded> <wfw:commentRss>http://www.arrangeactassert.com/how-to-create-a-sql-server-database-in-appharbor/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Served from: www.arrangeactassert.com @ 2012-05-18 13:30:07 by W3 Total Cache -->
