<?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>Aaron King</title>
	<atom:link href="http://aaronking.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://aaronking.me</link>
	<description>Software, Technology, Start-ups, Politics, Fatherhood</description>
	<lastBuildDate>Sat, 14 Jan 2012 03:08:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='aaronking.me' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/7b8a4fef074ec93cb96f09aeed568f83?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Aaron King</title>
		<link>http://aaronking.me</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://aaronking.me/osd.xml" title="Aaron King" />
	<atom:link rel='hub' href='http://aaronking.me/?pushpress=hub'/>
		<item>
		<title>Profiler for SQL Server Express by AnjLab</title>
		<link>http://aaronking.me/2012/01/14/profiler-for-sql-server-express-by-anjlab/</link>
		<comments>http://aaronking.me/2012/01/14/profiler-for-sql-server-express-by-anjlab/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 03:08:56 +0000</pubDate>
		<dc:creator>kingdango</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://aaronking.me/?p=67</guid>
		<description><![CDATA[I needed a tool to profile the performance of Entity Framework and LINQ to Entities for a recent project.  I wanted to see whether or not I was truly getting optimized data access performance.  My project was using SQL Express for the database server so I couldn&#8217;t simply use the standard SQL Profiler. I stumbled [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aaronking.me&amp;blog=31193426&amp;post=67&amp;subd=aaronkingdotme&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I needed a tool to profile the performance of Entity Framework and LINQ to Entities for a recent project.  I wanted to see whether or not I was truly getting optimized data access performance.  My project was using SQL Express for the database server so I couldn&#8217;t simply use the standard SQL Profiler.</p>
<p>I stumbled across this<a title="Profiler for SQL Server Express 2005/2008 by AnjLab" href="https://sites.google.com/site/sqlprofiler/" target="_blank"> free Profiler for SQL Express 2005/2008</a> by <a title="AnjLab" href="http://anjlab.com/" target="_blank">AnjLab</a>.  It appears to have all the power of Microsoft&#8217;s Profiler for SQL Server but is completely free and works with SQL Express.  I was able to achieve the performance analysis I needed for the project and was so impressed I made a donation.</p>
<p>Thanks AnjLab!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aaronkingdotme.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aaronkingdotme.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aaronkingdotme.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aaronkingdotme.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aaronkingdotme.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aaronkingdotme.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aaronkingdotme.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aaronkingdotme.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aaronkingdotme.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aaronkingdotme.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aaronkingdotme.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aaronkingdotme.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aaronkingdotme.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aaronkingdotme.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aaronking.me&amp;blog=31193426&amp;post=67&amp;subd=aaronkingdotme&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aaronking.me/2012/01/14/profiler-for-sql-server-express-by-anjlab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e22dce3e914d9e426762222a3d36dd76?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">kingdango</media:title>
		</media:content>
	</item>
		<item>
		<title>Code First Deployment Made Easy</title>
		<link>http://aaronking.me/2012/01/14/code-first-deployment-made-easy/</link>
		<comments>http://aaronking.me/2012/01/14/code-first-deployment-made-easy/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 02:09:19 +0000</pubDate>
		<dc:creator>kingdango</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Code First]]></category>
		<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://aaronkingdotme.wordpress.com/?p=52</guid>
		<description><![CDATA[Entity Framework 4.1 Code First Development ROCKS! Entity Framework 4.1 is an amazing next generation of what I think is one of Microsoft’s best things going.  I’ve followed the framework for the past few years and although I wasn’t fond of v1 I have completely changed my mind since then.  The main reason for my opinion [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aaronking.me&amp;blog=31193426&amp;post=52&amp;subd=aaronkingdotme&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Entity Framework 4.1 Code First Development ROCKS!</strong></p>
<p><a href="http://msdn.microsoft.com/en-us/data/aa937723">Entity Framework 4.1</a> is an amazing next generation of what I think is one of Microsoft’s best things going.  I’ve followed the framework for the past few years and although I wasn’t fond of v1 I have completely changed my mind since then.  The main reason for my opinion shift is the introduction and cultivation of the “Code First” development path to building a Model from scratch (or augmenting an existing model) and the virtually pain free data access functionality.</p>
<p>I’ll do a future post that goes into more detail about what “Code First” is but in the meantime checkout <a href="http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx">what ScottGu has said about code first</a>.  For now I’ll assume you know it well.  Likewise, code-first fits extremely well with Microsoft’s other best thing going, <a href="http://www.asp.net/mvc">ASP.NET MVC3</a> – more on that in a future post.</p>
<p>Code First is great for the development process because it gives the team the power to very quickly prototype functionality without having to take the traditional risk of dumping hours into the plumbing that makes the prototype possible.  Better still, if feedback proves positive the prototype can quickly be refined into the final product.  What that really means is you build better software faster and avoid repeating investments in basic data access plumbing.  Database Initializers make the process even better because you can programmatically add example data as you go.</p>
<p>That’s all great stuff but what about when you’re ready to deploy to production?</p>
<p><strong>Challenges Deploying Code First to Production</strong></p>
<p>Deploying a code first data model is not as straightforward as it could be.  You’ll find examples and suggestions to use a Database Initializer to build out your database in production and even populate the initial data but this proves very problematic.</p>
<p>Firstly, generating a database “on the fly” in production means you’d have to run as a user that has permissions to create (and drop, etc) a database – btw, that’s not a good idea in a production environment.  This also proves problematic when you need to deploy a “breaking change” that requires special handling of existing data.</p>
<p>Likewise, some suggest using SQL Management Studio to script the database and objects and then manually create them in production.  This is a better option but is a very manual intense process that also doesn’t properly address incremental and breaking changes over time.</p>
<p><strong>A Simple Solution:  Visual Studio Database Project</strong></p>
<p>What I chose to do is create a Visual Studio Database Project.  It’s as simple as adding a Database Project to your solution and then right clicking on the project and clicking the “Import Database Object and Settings” option.</p>
<p>Visual Studio generates scripts for the database and all of its objects.  This is great because you can take the scripts as they are and use them if needed; however, the real power lies in the Deploy capabilities within the project properties.</p>
<p>You have the option of generating a complete install script for the database.  Furthermore, you can choose to automatically deploy and run this script against your database server when you “Deploy” the project and solution.</p>
<p>Database projects also provide substantial assistance in <a href="http://msdn.microsoft.com/en-us/library/aa833404.aspx">change tracking and deployment</a>.  One option is to continue code first development practices and deploy changes by doing a schema comparison and incremental deployment.  Another option is to discontinue code first altogether once you have a v1 baseline database; then from there use the database project itself to manage future changes.</p>
<p>I like both options but I choose to discontinue code first once I have deployed a v1 database.  From there I use the database project to make any changes to the database and simply deploy the current schema with each subsequent release.</p>
<p>That’s pretty much it for now.  I don’t propose this is an in-depth tutorial but instead a solution overview with some pointers to more discussion.  I hope this helps and look forward to your comments.</p>
<p><strong>More Resources</strong></p>
<p>Entity Framework 4.1<br />
<a href="http://msdn.microsoft.com/en-us/data/aa937723">http://msdn.microsoft.com/en-us/data/aa937723</a></p>
<p>ScottGu on Code First<br />
<a href="http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx">http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework-4.aspx</a></p>
<p>Build and Deploy Databases (VS Database Projects)<br />
<a href="http://msdn.microsoft.com/en-us/library/dd193413.aspx">http://msdn.microsoft.com/en-us/library/dd193413.aspx</a></p>
<p>Managing Database Change<br />
<a href="http://msdn.microsoft.com/en-us/library/aa833404.aspx">http://msdn.microsoft.com/en-us/library/aa833404.aspx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aaronkingdotme.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aaronkingdotme.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aaronkingdotme.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aaronkingdotme.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/aaronkingdotme.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/aaronkingdotme.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/aaronkingdotme.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/aaronkingdotme.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aaronkingdotme.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aaronkingdotme.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aaronkingdotme.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aaronkingdotme.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aaronkingdotme.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aaronkingdotme.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aaronking.me&amp;blog=31193426&amp;post=52&amp;subd=aaronkingdotme&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://aaronking.me/2012/01/14/code-first-deployment-made-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e22dce3e914d9e426762222a3d36dd76?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">kingdango</media:title>
		</media:content>
	</item>
	</channel>
</rss>
