<?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>J-dee.com &#187; EntityFramework</title>
	<atom:link href="http://www.j-dee.com/category/entityframework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.j-dee.com</link>
	<description>Liverpool ASP.NET Developer - C#, jQuery, Js, Rails, SQL, Agile, OOP, Cool Web Tech</description>
	<lastBuildDate>Sat, 05 Dec 2009 10:29:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Entity Framework Under Fire</title>
		<link>http://www.j-dee.com/2008/06/27/entity-framework-under-fire/</link>
		<comments>http://www.j-dee.com/2008/06/27/entity-framework-under-fire/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 12:24:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[EntityFramework]]></category>

		<guid isPermaLink="false">http://www.j-dee.com/2008/06/27/entity-framework-under-fire/</guid>
		<description><![CDATA[If like me you spend some of your spare time keeping tabs on what is going on in the .Net blogosphere you wont have failed to notice the current drama surrounding the new Microsoft Entity Framework.
To cut a long story short: a bunch of know-it-alls have got their knickers in a twist over some of [...]]]></description>
			<content:encoded><![CDATA[<p>If like me you spend some of your spare time keeping tabs on what is going on in the .Net blogosphere you wont have failed to notice the current drama surrounding the new Microsoft Entity Framework.</p>
<p>To cut a long story short: a bunch of know-it-alls have got their <a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/" target="_blank">knickers in a twist</a> over some of the features excluded from version 1 ( VERSION 1!!!) of the framework. I think, knowing the nature in which Microsoft evolves their products nowadays ( look at how different the Ajax Framework is now compared to the first release ) this really is a storm in a teacup. The most common sense, pragmatic, real world view of the state of play is <a href="http://neverindoubtnet.blogspot.com/2008/06/rejoinder-1-to-of-no-confidence-in.html" target="_blank">this one by Ward Bell</a>. For me, he hits the nail on the head.</p>
<p>In my opinion there is a real attitude problem on display from the petitioners, who I suspect have a vested interest in seeing EF fail or look half thought out. I&#8217;ve had a long term disregard for 99% of ORM tool vendors ( the excellent Subsonic framework excluded ) because of the <a href="http://forums.asp.net/p/897690/971921.aspx" target="_blank">&#8216;I-know-best-don&#8217;t-even-try-to-question-or-understand&#8217;</a> tactics they use to retain a foothold in the marketplace.</p>
<p>I&#8217;m a big fan of this quote from the highly recommended book &#8211; <a href="http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X" target="_blank">The Pragmatic Programmer by Andrew Hunt &amp; David Thomas</a>:</p>
<p><strong>&#8220;Critically Analyse What You Read and Hear</strong>. Don&#8217;t be swayed by vendors, media hype, or dogma. Analyse information in terms of you and your project.&#8221;</p>
<p>Bottom line: Make your own mind up about Entity Framework, about if it&#8217;s right for you and your projects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.j-dee.com/2008/06/27/entity-framework-under-fire/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ADO.NET Entity Framework Quickstart Tutorial</title>
		<link>http://www.j-dee.com/2008/06/03/adonet-entity-framework-quickstart-tutorial/</link>
		<comments>http://www.j-dee.com/2008/06/03/adonet-entity-framework-quickstart-tutorial/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 16:29:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[EntityFramework]]></category>
		<category><![CDATA[LINQ]]></category>

		<guid isPermaLink="false">http://www.j-dee.com/?p=104</guid>
		<description><![CDATA[The ADO.NET Entity framework received another update last week as part of the Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta, so to coincide with this I give you a quick run through to get you started. Being honest, if you have used an OR mapper in the past this will be [...]]]></description>
			<content:encoded><![CDATA[<p>The ADO.NET Entity framework received another update last week as part of the <a href="http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx" target="_blank">Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta</a>, so to coincide with this I give you a quick run through to get you started. Being honest, if you have used an OR mapper in the past this will be familiar territory. If not, this new implementation is a good place to start.</p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.j-dee.com/wp-content/uploads/2008/06/screenshot11.jpg" border="0" alt="screenshot1" align="left" /> So to begin, create a new ASP.NET website, Add New item, and then choose ADO.NET Entity Data Model. Name it <strong>EntityModel.edmx</strong> and click <strong>Add</strong> to create a new model.</p>
<p>The Entity Data Model Wizard will pop up and give you a chance to configure your new model. For the purposes of this walk through, choose <strong>Generate from database</strong> and click <strong>Next</strong>.</p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.j-dee.com/wp-content/uploads/2008/06/screenshot41.jpg" border="0" alt="screenshot4" align="right" /> Set up your data connection, I won&#8217;t go into this as it&#8217;s simple enough to figure out if you&#8217;ve never done it before. Click the checkbox to save entity connection settings into your web.config and name it <strong>MyEntities.</strong></p>
<p><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.j-dee.com/wp-content/uploads/2008/06/screenshot61.jpg" border="0" alt="screenshot6" width="167" height="221" align="left" />The wizard will then tootle off and retrieve the names of all the tables, views and stored procedures in your database. Choose a table ( I&#8217;ve chosen a table from my DB called &#8216;Log&#8217; ) and name the Model Namespace <strong>MyModel</strong>.</p>
<p>Click <strong>Finish</strong> and the designer for your model will open. As a side note have a look at the Model Browser on the right hand side &#8211; it looks a bit &#8216;rendered&#8217; for want of a better description, as though it&#8217;s drawn via GDI+ compared to the Solution Explorer&#8230;.strange!</p>
<p>Now add a new web page and go into the code behind to start the real work. It&#8217;s just a simple bit of code to CRUD the Log entities in my database.</p>
<p><span style="color: #008000;"><br />
// instantiate a new Log entity<br />
</span>MyModel.<span style="color: #2b91af;">Log </span>log = <span style="color: #0000ff;">new </span>MyModel.<span style="color: #2b91af;">Log</span>();</p>
<p><span style="color: #008000;">// populate it&#8217;s properties<br />
</span>log.Date = <span style="color: #2b91af;">DateTime</span>.Now;<br />
log.Exception = <span style="color: #a31515;">&#8220;Test Exception&#8221;</span>;<br />
log.Level = <span style="color: #a31515;">&#8220;Test Level&#8221;</span>;<br />
log.Logger = <span style="color: #a31515;">&#8220;Test Logger&#8221;</span>;<br />
log.Message = <span style="color: #a31515;">&#8220;Test Message&#8221;</span>;<br />
log.Thread = <span style="color: #a31515;">&#8220;Test Thread&#8221;</span>;</p>
<p><span style="color: #008000;">//instantiate the entity &#8216;context&#8217; &#8211; the object used<br />
//as a &#8216;gateway&#8217; to the DB<br />
</span>MyModel.MyEntities entities = <span style="color: #0000ff;">new </span>MyModel.MyEntities();</p>
<p><span style="color: #008000;">// Save the new log entity to the DB<br />
</span>entities.AddToLog(log);<br />
entities.SaveChanges();</p>
<p><span style="color: #008000;">// Load it back via a little LINQ query<br />
// ( funny how you must use .First instead of .Single )<br />
</span>MyModel.<span style="color: #2b91af;">Log </span>loadedLog = entities.Log .Where(ent =&gt; ent.Level == <span style="color: #a31515;">&#8220;Test Level&#8221;</span>).First();</p>
<p><span style="color: #008000;">// make a change and save it back to the DB<br />
</span>loadedLog.Message = <span style="color: #a31515;">&#8220;Message has changed!&#8221;</span>;<br />
entities.SaveChanges();</p>
<p><span style="color: #008000;">// Finally delete the object from the DB<br />
</span>entities.DeleteObject(loadedLog);<br />
entities.SaveChanges();</p>
<p><strong>Notice how you have to call .SaveChanges() to persist back to the DB. That&#8217;s it! A super fast run through of CRUD with the ADO.NET Entity Framework! Enjoy!</strong> <br/> <br/><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.j-dee.com%2f2008%2f06%2f03%2fadonet-entity-framework-quickstart-tutorial%2f"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.j-dee.com%2f2008%2f06%2f03%2fadonet-entity-framework-quickstart-tutorial%2f" border="0" alt="kick it on DotNetKicks.com" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.j-dee.com/2008/06/03/adonet-entity-framework-quickstart-tutorial/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
