<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.microsoft.co.il/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Ido Flatow</title><link>http://blogs.microsoft.co.il/blogs/idof/</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>No more URL copy &amp; paste for me !</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2010/03/02/no-more-url-copy-amp-paste-for-me.aspx</link><pubDate>Tue, 02 Mar 2010 16:35:21 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:532469</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=532469</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2010/03/02/no-more-url-copy-amp-paste-for-me.aspx#comments</comments><description>&lt;div dir="ltr" align="left"&gt; &lt;p align="left"&gt;Ever wrote a word document where you needed to use a lot of hyperlinks? You need to go to your internet site, copy the URL, go back to the document, mark you text, right-click, select “Hyperlink”, paste the address in the link textbox and press OK ! well, no more !&lt;/p&gt;  &lt;p align="left"&gt;Apparently there is a better technique to do this in word:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;div align="left"&gt;Mark your text, right-click it and select “Hyperlink” from the context menu.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Open the required site in your browser (you can also move to an already opened browser).&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Move back to the word document where the Hyperlink dialog is already opened.&lt;/div&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p align="left"&gt;Presto ! the address of the site you were just in will appear in the hyperlink&amp;#39;s textbox !&lt;/p&gt;  &lt;p align="left"&gt;Unfortunately, this feature only uses URL from internet explorer, so for all of you firefox / chrome fans, you need to stick with copy &amp;amp; paste.&lt;/p&gt; &lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=532469" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/OffTopic/default.aspx">OffTopic</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Word/default.aspx">Word</category></item><item><title>Devart’s Entity Framework provider for Oracle, now for EF4 !</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2010/02/09/devart-s-entity-framework-provider-for-oracle-now-for-ef4.aspx</link><pubDate>Tue, 09 Feb 2010 14:45:37 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:515689</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=515689</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2010/02/09/devart-s-entity-framework-provider-for-oracle-now-for-ef4.aspx#comments</comments><description>&lt;div align="left" dir="ltr"&gt; &lt;p align="left"&gt;It’s finally here, an Entity Framework 4 provider for oracle, complements of &lt;a href="http://www.devart.com/"&gt;Devart&lt;/a&gt;.&lt;/p&gt;  &lt;p align="left"&gt;You can download the provider (trial version of course) from &lt;a href="http://www.devart.com/dotconnect/oracle/download.html"&gt;here&lt;/a&gt;, look for version 5.55 beta.&lt;/p&gt; &lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=515689" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/EF/default.aspx">EF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Devart/default.aspx">Devart</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Oracle/default.aspx">Oracle</category></item><item><title>Communicating From Silverlight 4 – My session at the SDP</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/12/30/communicating-from-silverlight-4-my-session-at-the-sdp.aspx</link><pubDate>Wed, 30 Dec 2009 19:04:10 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:479711</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=479711</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/12/30/communicating-from-silverlight-4-my-session-at-the-sdp.aspx#comments</comments><description>&lt;div dir="ltr" align="left"&gt; &lt;p align="left"&gt;Today at the &lt;a href="http://www.sela.co.il/sdp"&gt;SDP&lt;/a&gt; I gave a lecture on the different ways we can communicate with the web from Silverlight 4. We talked about the different HTTP Stacks Silverlight offers and the many communication types &amp;amp; technologies you can use, such as:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="left"&gt;Simple http requests&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Restful services&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Syndication (Rss/Atom) feeds&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;ASMX Web Services&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;WCF services&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;WCF Data Services&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;TCP communication&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;UDP communication&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="left"&gt;Yes, you can do all the above with Silverlight 4 !&lt;/p&gt;  &lt;p align="left"&gt;In addition, we talked about different WCF scenarios that you can achieve in Silverlight 4, such as:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="left"&gt;Binary message encoding&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Catching SOAP Faults&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Passing HTTP &amp;amp; SOAP Headers&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Authentication&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Using Duplex&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="left"&gt;You can download the presentation and the code samples from &lt;a href="http://cid-5ef5be1ab30a6056.skydrive.live.com/browse.aspx/.Public/SDP-SLM402-Communicating%20from%20Silvelright"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="left"&gt;The lecture’s recording will be available from the SDP site in a few days, so stay tuned…&lt;/p&gt; &lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=479711" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/_D405E805E605D005D405_/default.aspx">הרצאה</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/lecture/default.aspx">lecture</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/_E105DC05E205_/default.aspx">סלע</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Silverlight+4/default.aspx">Silverlight 4</category></item><item><title>My ORM presentation at SDP (Sela Developer Practice)</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/12/28/my-orm-presentation-at-sdp-sela-developer-practice.aspx</link><pubDate>Mon, 28 Dec 2009 09:11:49 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:477422</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=477422</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/12/28/my-orm-presentation-at-sdp-sela-developer-practice.aspx#comments</comments><description>&lt;div dir="ltr" align="left"&gt;   &lt;p align="left"&gt;Just finished passing my &lt;a href="http://cid-5ef5be1ab30a6056.skydrive.live.com/self.aspx/.Public/SDP-ORM%20Seminar.pdf"&gt;presentation&lt;/a&gt; about ORM &amp;amp; Entity Framework basics&lt;/p&gt;    &lt;p align="left"&gt;This presentation is part of a whole-day seminar about ORM Tools &amp;amp; Concepts&lt;/p&gt;    &lt;p align="left"&gt;Currently &lt;a href="http://blogs.microsoft.co.il/blogs/berniea"&gt;Bernie&lt;/a&gt; &amp;amp; &lt;a href="http://blogs.microsoft.co.il/blogs/erezh/"&gt;Erez&lt;/a&gt; are demonstrating NHibernate &amp;amp; Entity Framework head-to-head and later on &lt;a href="http://blogs.microsoft.co.il/blogs/gilf/"&gt;Gil&lt;/a&gt; will deep dive into Entity Framework and Erez &amp;amp; Bernie will once again join forces to talk about Data Access Pattern in the real world. &lt;/p&gt;    &lt;p align="left"&gt;We’ll finish the day with an Expert Panel, where &lt;a href="http://ayende.com/blog"&gt;Oren Eini&lt;/a&gt; will join us to talk about ORMs, NHibernate, Entity Framework, Pattern, Tips &amp;amp; Tricks and more.&lt;/p&gt;    &lt;p align="left"&gt;Be sure to download the presentation from our blogs. Video recordings will be available after the &lt;a href="http://www.sela.co.il/s/sdp/default.html"&gt;SDP&lt;/a&gt;.&lt;/p&gt; &lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=477422" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/EF/default.aspx">EF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/_E105DC05E205_/default.aspx">סלע</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/ORM/default.aspx">ORM</category></item><item><title>Handling SOAP Faults In Silverlight</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/12/08/handling-soap-faults-in-silverlight.aspx</link><pubDate>Tue, 08 Dec 2009 11:00:16 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:461499</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=461499</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/12/08/handling-soap-faults-in-silverlight.aspx#comments</comments><description>&lt;div dir="ltr" align="left"&gt;   &lt;p align="left"&gt;In the past, when we tried to connect from Silverlight 2 to WCF Services that threw exceptions (every now and then), we got the famous “Not found” Communication Exception.&lt;/p&gt;    &lt;p align="left"&gt;The reason we didn’t get a SOAP Fault is that WCF returns SOAP Fault responses with a HTTP code of 500 – this is according to &lt;a href="http://www.w3.org/TR/soap12-part2/#http-respbindprocess"&gt;SOAP protocol&lt;/a&gt;, but the browser doesn’t allow 500 responses to be returned to Silverlight – it replaces them with a CommunicationException and thus hides the real fault that returned.&lt;/p&gt;    &lt;p align="left"&gt;When we moved to Silverlight 3, Microsoft published the &lt;a href="http://msdn.microsoft.com/en-us/library/dd470096(VS.95).aspx"&gt;following article&lt;/a&gt;, describing how to workaround the browser’s block, using a Message Inspector in the WCF-side to replace HTTP 500 fault responses with a HTTP 200 fault responses, thus allowing Silvelright to get these messages.&lt;/p&gt;    &lt;p align="left"&gt;But… this fix will make your WCF service not compatible with the SOAP protocol, not mentioning you’ll have a whole new inspector to manage (test, debug, maintain…), and you’re debug skill will need to improve (try using fiddler to find these errors when the return code is 200 and not 500 – no red lines !!).&lt;/p&gt;    &lt;p align="left"&gt;There is another solution that isn’t discussed much, and doesn’t require making any changes in WCF – changing the HTTP Stack Silvelright uses for the services.&lt;/p&gt;    &lt;p align="left"&gt;In Silverlight 3 a new HTTP Stack was released – the Client HTTP Stack. The Client Stack uses the OS directly to create network operations, instead of using the browser. The new stack can be used instead of the Browser’s HTTP Stack for http and https. There are some differences between the stacks, one of them being the Client’s stack ability to handle all types of responses, including HTTP 500 responses.&lt;/p&gt;    &lt;p align="left"&gt;To use the Client Stack for a specific service, just add the following code at the beginning of your Silverlight application (just change the url):&lt;/p&gt;    &lt;div id="codeSnippetWrapper"&gt;     &lt;pre style="border-bottom-style:none;text-align:left;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:&amp;#39;Courier New&amp;#39;, courier, monospace;direction:ltr;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;" id="codeSnippet"&gt;&lt;p&gt;HttpWebRequest.RegisterPrefix(&lt;span style="color:#006080;"&gt;&lt;a href="http://localhost/services/serviceX"&gt;http://localhost/services/serviceX&lt;/a&gt;&lt;/span&gt;, &lt;br /&gt;WebRequestCreator.ClientHttp);&lt;/p&gt;&lt;/pre&gt;
  &lt;/div&gt;

  &lt;div align="left"&gt;&amp;#160;&lt;/div&gt;

  &lt;div align="left"&gt;The above line of code will tell Silverlight to use the Client stack whenever a call is made to a URL with that prefix – all other calls will use the Browser stack. If you want all calls to go through the Client stack, use a prefix of “http://”&lt;/div&gt;

  &lt;p align="left"&gt;You can read more about the ClientHttp class &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.browser.webrequestcreator.clienthttp(VS.95).aspx"&gt;here&lt;/a&gt;, or just come to the &lt;a href="http://www.sela.co.il/s/sdp/Presentations.html#SLM402"&gt;SDP&lt;/a&gt; (registration required), where I will talk about the Client stack and other changes made in Silverlight 3 &amp;amp; Silverlight 4 that improves Silverlight’s ability to use network resources.&lt;/p&gt;

  &lt;p align="left"&gt;There are going to be many cool stuff in the SDP lectures, straight from the PDC, I myself still haven’t decided which lectures to go to (WCF 4? ASP.NET 4? WF? many to choose from).&lt;/p&gt;
&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=461499" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/tips+and+tricks/default.aspx">tips and tricks</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/_E105DC05E205_/default.aspx">סלע</category></item><item><title>PDC 09 – Entity Framework 4</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/18/pdc-09-entity-framework-4.aspx</link><pubDate>Wed, 18 Nov 2009 01:27:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:447220</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=447220</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/18/pdc-09-entity-framework-4.aspx#comments</comments><description>&lt;div dir="ltr"&gt;
&lt;p align="left"&gt;First time that I can say – there are MANY people that use EF4. How do I know? because the &lt;a href="http://microsoftpdc.com/Sessions/FT10"&gt;session&lt;/a&gt; had the room filled with people, with people waiting outside !&lt;/p&gt;
&lt;p align="left"&gt;EF 4 is great. It solved many of the problems of EF3.5 and made the technology more mature and useful. &lt;/p&gt;
&lt;p align="left"&gt;What annoyed me in the lecture is that it showed all the features of EF4 that people already know of (well, I know of). The title was misleading because I thought they will talk about new features that don&amp;#39;t exist currently.&lt;/p&gt;
&lt;p align="left"&gt;Here is the list of features, and links to blog posts regarding them:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/11/05/model-first-with-the-entity-framework-4.aspx"&gt;Model first and DDL creation&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/efdesign/archive/2008/12/02/pluralization.aspx"&gt;Pluralization of entity types and sets&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/05/12/sneak-preview-deferred-loading-in-entity-framework-4-0.aspx"&gt;Lazy loading&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/05/21/poco-in-the-entity-framework-part-1-the-experience.aspx"&gt;POCO with Code First&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/06/16/using-repository-and-unit-of-work-patterns-with-entity-framework-4-0.aspx"&gt;Using EF with Mock objects for TDD&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://thedatafarm.com/blog/data-access/objectcontext-savechanges-is-now-virtual-overridable-in-ef4/"&gt;Overriding SaveChanges method&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/11/15/updated-feature-ctp-walkthrough-self-tracking-entities-for-the-entity-framework.aspx"&gt;Self Tracking Entities&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/dsimmons/archive/2009/11/09/attachasmodified-revisited.aspx"&gt;Ability to change entity state with the ObjectStateManager’s new ChangeObjectState method&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/08/05/improvements-to-the-generated-sql-in-net-4-0-beta1.aspx"&gt;SQL query upgrades and fixes&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/11/12/automatic-generation-of-stored-procedure-return-types.aspx"&gt;Using TSQL queries inside EF and projecting them to Entity/Complex types&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/efdesign/archive/2009/01/07/model-defined-functions.aspx"&gt;Calling UDF from queries&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/11/06/foreign-key-relationships-in-the-entity-framework.aspx"&gt;Using foreign keys in the EDM&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://blogs.msdn.com/efdesign/archive/2009/08/03/code-only-enhancements.aspx"&gt;Code Only (part of the EF CTP) + Fluent API&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p align="left"&gt;One new think that was introduced was the “&lt;a href="http://msdn.microsoft.com/en-us/library/dd857506(VS.85).aspx"&gt;Quadrant&lt;/a&gt;” project – cool graphical tool that allows editing SQL Server data.&lt;/p&gt;
&lt;p align="left"&gt;I’m not saying the session wasn’t good, for people that are unfamiliar with EF4, the session was great and it covered a lot of new features. For someone like me that is familiar with EF4 since the first beta, the session didn’t add much.&lt;/p&gt;
&lt;p align="left"&gt;Don’t forget the Entity Framework session and tutorial on the &lt;a href="http://www.sela.co.il/sdp"&gt;SDP&lt;/a&gt; – we’ll have a session about Entity Framework 4 (for those who are unfamiliar) and will have a whole day of EF &amp;amp; ORM tutorials with the best EF guys in Sela (&lt;a href="http://blogs.microsoft.co.il/blogs/erezh"&gt;Erez Harari&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/gilf"&gt;Gil Fink&lt;/a&gt;, &lt;a href="http://blogs.microsoft.co.il/blogs/berniea"&gt;Bernie Almosni&lt;/a&gt; and myself).&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=447220" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/EF/default.aspx">EF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/PDC09/default.aspx">PDC09</category></item><item><title>PDC 09 updated – ASP.NET 4 Futures</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/18/pdc-09-updated-asp-net-4-futures.aspx</link><pubDate>Wed, 18 Nov 2009 00:59:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:447204</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=447204</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/18/pdc-09-updated-asp-net-4-futures.aspx#comments</comments><description>&lt;div dir="ltr"&gt;
&lt;p align="left"&gt;I must admit, I had not used ASP.NET for a long time (lately I’m a Silverlight fan), so most of the things were new to me. What I liked about this &lt;a href="http://microsoftpdc.com/Sessions/FT18"&gt;session&lt;/a&gt; is that it was indeed about “Futures” because some of the things shown were still in development. &lt;/p&gt;
&lt;p align="left"&gt;The topics discussed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;Helpers&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;RAD development using ActiveRecord over Entity Framework for Asp.Net MVC&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Introducing TaskScheduler to perform background tasks (no need to code with System.Threading no more)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Sending Emails with verification&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;New control for file upload with progress bar &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Simple mechanism for using routing with web forms (aspx). &lt;br /&gt;Instead of using “\App\Welcome.aspx” use “App\Welcome”. &lt;br /&gt;This is being done with the new SmartyRoute class (I have a feeling that this name will change when the RTM is released).&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;HTML5&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;The menu control is now implemented under HTML5 as a &amp;lt;menu&amp;gt; element.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;The team is checking how to incorporate new HTML5 standards such as &amp;lt;video&amp;gt; and &amp;lt;audio&amp;gt; elements&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Web Storage can be accessed with AJAX using the IntermediateDataContext (Again, I have a feeling that the name will change) which works together with the existing &lt;a href="http://msdn.microsoft.com/en-us/library/dd393781(VS.100).aspx"&gt;AdoNetDataContext&lt;/a&gt; class&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Caching&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;Velocity implementation for Session state provider&amp;nbsp; - but that we already know (if not, take a look at a &lt;a href="http://blogs.microsoft.co.il/blogs/idof/archive/2009/10/20/velocity.aspx"&gt;lecture&lt;/a&gt; I did).&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Velocity implementation for OutputCache. For this the OutputCache was changed to support provider mechanism, so you can actually write your own provider for the output cache.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;CSS sprites: CSS sprites are used to optimize download of images, instead of making the browser run multiple requests to get numerous images, the browser sends one request to get a large image, constructed of all the images and CSS styles are used to specify which section of the large image should be displayed in each element.&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;CSS sprite support is added to ASP.NET (just change the “Images” folder to “Sprites”) – You can control whether you want sprites or not using the SpriteGroups class.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;You can use a sprite image class to specify when you want to get an image as a sprite: &lt;br /&gt;&amp;lt;%= Html.SpriteImage(elementName, altText)%&amp;gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;The generated code is a DIV element that uses the background-position CSS attribute&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;ActiveRecord&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;Used to wrap Entity Framework and to provide easier usage of the technology&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Implemented to be used in Asp.Net MVC&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Allows automatic creation of SQL Compact edition databases (MDF file)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Supports automatic DB table changing when the entity class is changing (for example – adding a property to an entity results in a new column in the table). &lt;br /&gt;Nice feature – not sure how it will work in production environments&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p align="left"&gt;To conclude, I enjoyed this lecture, looking forward to the release of Asp.Net 4 with VS 2010.&lt;/p&gt;
&lt;p align="left"&gt;As for HTML5 – funny that all the demos were in FireFox and not IE8.X. When will IE support HTML5? If the Asp.Net team accepts that HTML5 is coming, shouldn’t the IE team also start working on the matter?&lt;/p&gt;
&lt;p align="left"&gt;We will discuss Asp.Net 4 on the &lt;a href="http://www.sela.co.il/sdp"&gt;SDP&lt;/a&gt; which will be on December, so don’t forget to register.&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=447204" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/PDC09/default.aspx">PDC09</category></item><item><title>PDC blogging – Data Programming and Modeling</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/17/pdc-blogging-data-programming-and-modeling.aspx</link><pubDate>Tue, 17 Nov 2009 21:40:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:447079</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=447079</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/17/pdc-blogging-data-programming-and-modeling.aspx#comments</comments><description>&lt;div dir="ltr"&gt;
&lt;p align="left"&gt;As I&amp;#39;ve stated before, I attended the &lt;a href="http://microsoftpdc.com/Sessions/P09-04"&gt;data programming and modeling session&lt;/a&gt; - And I enjoyed every minute. Chris Anderson and Don Box rock !&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p align="left"&gt;They talked about Entity Framework 4 – The automatic lazy load (no more need to call the damn Load() method), different approached of model first, POCO and code only (using the fluent API) etc. &lt;/p&gt;
&lt;p align="left"&gt;There was a talk about code first having a configuration class instead of writing all the fluent API by hand, and without having to add attributes to your POCO classes - that is something worth checking out. &lt;/p&gt;
&lt;p align="left"&gt;They also showed the new Transact Sql editor that was shipped with VS2010, Which allows running TSQL queries and also has intellisense:&lt;/p&gt;
&lt;p align="left"&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/idof/image_5DF82814.png"&gt;&lt;img style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/idof/image_thumb_63FF2915.png" width="393" height="122" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="left"&gt;&lt;a href="http://blogs.microsoft.co.il/blogs/idof/image_4367C396.png"&gt;&lt;img style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;DISPLAY:inline;BORDER-TOP:0px;BORDER-RIGHT:0px;" title="image" border="0" alt="image" src="http://blogs.microsoft.co.il/blogs/idof/image_thumb_4DB8E7F6.png" width="476" height="287" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p align="left"&gt;After talking about EF we got to the real deal - &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/11/17/breaking-down-data-silos-the-open-data-protocol-odata.aspx"&gt;ODATA&lt;/a&gt; (Open Data Protocol) that allows producing and consuming data through various applications, for example export Sharepoint data and consume with Excel, &lt;/p&gt;
&lt;p align="left"&gt;If you want to expose your data using the OData protocol you can easily build a service using the ado.net data services. To describe the data returned from these services you don&amp;#39;t use XSD schemas anymore but rather... the EDM (Entity Data Model) ! A new use for the well known EF&amp;#39;s EDM. &lt;/p&gt;
&lt;p align="left"&gt;Last, but not least, they showed bits from &lt;a href="http://msdn.microsoft.com/en-us/data/ee460940.aspx"&gt;project “M”&lt;/a&gt; - you can take an EDMX file, rename its extension to “.M” in VS and it will automatically change to a “M” model and vice versa – I tried it in VS 2010 beta 2 but it didn’t work, maybe it part of the next version ?. This project is quite new and I didn’t had a chance to look at it yet, but there are some lectures on the project in the following days which I’ll try to attend and post about later on.&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=447079" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/PDC09/default.aspx">PDC09</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Ado.Net+Data+Services/default.aspx">Ado.Net Data Services</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Project+_2600_quot_3B00_M_2600_quot_3B00_/default.aspx">Project &amp;quot;M&amp;quot;</category></item><item><title>PDC 2009 First Impression</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/17/pdc-2009-first-impression.aspx</link><pubDate>Tue, 17 Nov 2009 19:05:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:446992</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=446992</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/17/pdc-2009-first-impression.aspx#comments</comments><description>&lt;div dir="ltr"&gt;
&lt;p align="left"&gt;Wow ! I’m not familiar with events of this size. For me, Israeli Tech-Ed was the biggest event I attended.&lt;/p&gt;
&lt;p align="left"&gt;Well, there’s something strange about flying 20 hours to the far end of the world, going to a city with million of people of different types, and entering a conference center will thousands of geeks moving around.&lt;/p&gt;
&lt;p align="left"&gt;First Keynote was interesting, a lot of talking about “3 screens and a cloud”, cloud in general, Azure in specific. Many new features in VS2010, IIS, and Windows to support all the features of Azure and such.&lt;/p&gt;
&lt;p align="left"&gt;I’m looking forward to the different session. My interest is in the technologies I use in my day to day work – Silverlight, Entity Framework, WCF, Asp.Net &amp;amp; VS2010 &amp;amp; TFS.&lt;/p&gt;
&lt;p align="left"&gt;Currently I’m sitting in the &lt;a href="http://microsoftpdc.com/Sessions/P09-04"&gt;Data Programming and Modeling for the Microsoft .NET Developer&lt;/a&gt; session, talking about EF more. &lt;/p&gt;
&lt;p align="left"&gt;Don’t forget, in the coming SDP we’ll talk about &lt;a href="http://www.sela.co.il/sdp/default.html"&gt;EF 4&lt;/a&gt; and we’ll have a full day of &lt;a href="http://www.sela.co.il/sdp/tutorials.html"&gt;ORM &amp;amp; EF tutorials&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=446992" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/EF/default.aspx">EF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/PDC09/default.aspx">PDC09</category></item><item><title>Implementing Composite design pattern in Entity Framework</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/17/implementing-composite-design-pattern-in-entity-framework.aspx</link><pubDate>Tue, 17 Nov 2009 01:55:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:446523</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=446523</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/17/implementing-composite-design-pattern-in-entity-framework.aspx#comments</comments><description>&lt;div dir="ltr" align="left"&gt;
&lt;p align="left"&gt;Last week, a colleague of mine asked me to create a sample composite design pattern model in Entity Framework. I thought to myself, no problem, created the table that contains the Component, Leaf &amp;amp; Composite entities (according to TPH – Table Per Hierarchy) and went to build the EDM based on the table and there I started to have problems which needed manual fixing. Since I’m working with EF 3.5, I’ve built the DB prior to the model – In EF 4.0 you can do model-first and build your db by script.&lt;/p&gt;
&lt;p align="left"&gt;After reverse engineering the db table, I got one entity named “CompositePattern”. From there I had to do some things in the designer and some things manually:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;In the designer, change the name of “CompositePattern” to “Component”.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Mark the entity abstract.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Create a new entity, called “Leaf” and base it on the “Component” entity.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Move the required properties from the “Component” type to the “Leaf” type by cutting &amp;amp; pasting the scalar properties (You may need to set the mappings for the properties you’ve moved).&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Create a new entity, called “Composite” and base it on the “Component” type.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Now comes the tricky part – moving the children relation from the “Component” type to the “Composite” type. This cannot be done in the designer, only straight in the XML itself.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Before changing the navigational property, note that there are two navigational properties for the composite-&amp;gt;component relation - one on each side: a navigational property “Children” from “Composite” to “Component”, and another navigational property “Parent” from “Component” to “Composite” – This is what we’ll need to change in the EDMX file.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Open the EDMX file with a xml editor (right-click the .EDMX file and choose “Open with…” and select “XML Editor”.&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Since EF’s wizard didn’t name the navigational properties correctly, we’ll start by finding and replacing them. You can identify which navigational property is the parent and which is the children according to the multiplicity – the “Parent” should be marked as “0..1” and the “Children” should be marked as &amp;quot;*” (in my case it was “CompositePattern” and “CompositePattern1” accordingly) – Locate all the occurrences of these names and replace them with “Parent” and “Children” accordingly. &lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Now that we named the navigational properties and associations, we ca start changing things. The changes are only in the CSDL part: &lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;Locate the association element for the composite-&amp;gt;component relation (If you’re working in a new model, you should have only one association element) - Change the type of “Parent” to “Composite” (because parents are always of type composite)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Locate the “Children” navigation property in the “Component” type and move it to the “Composite” type.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;Close the file. You can try to open it again in the designer, for me it did not work with EF 3.5 and VS 2008 SP1, but did work with EF 3.5 and VS 2010 Beta 2.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p align="left"&gt;Write some code to insert composites and leafs and see how it works.&lt;/p&gt;
&lt;p align="left"&gt;If you got mixed up and didn’t manage to create the composite model, no fear – the sample model can be downloaded from &lt;a href="http://cid-5ef5be1ab30a6056.skydrive.live.com/self.aspx/.Public/EFCompositePatternImplementation.rar"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p align="left"&gt;The sql for building the db table (In SqlServer) is:&lt;/p&gt;
&lt;div&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;" id="codeSnippet"&gt;&lt;p&gt;&lt;span style="COLOR:#0000ff;"&gt;CREATE&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;TABLE&lt;/span&gt; [dbo].[CompositePattern](&lt;br /&gt;      [ID] [uniqueidentifier] &lt;span style="COLOR:#0000ff;"&gt;NOT&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;NULL&lt;/span&gt;,&lt;br /&gt;      [FirstName] [&lt;span style="COLOR:#0000ff;"&gt;varchar&lt;/span&gt;](50) &lt;span style="COLOR:#0000ff;"&gt;NULL&lt;/span&gt;,&lt;br /&gt;      [LastName] [&lt;span style="COLOR:#0000ff;"&gt;varchar&lt;/span&gt;](50) &lt;span style="COLOR:#0000ff;"&gt;NULL&lt;/span&gt;,&lt;br /&gt;      [ParentID] [uniqueidentifier] &lt;span style="COLOR:#0000ff;"&gt;NULL&lt;/span&gt;,&lt;br /&gt;      [Type] [&lt;span style="COLOR:#0000ff;"&gt;int&lt;/span&gt;] &lt;span style="COLOR:#0000ff;"&gt;NOT&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;NULL&lt;/span&gt;,&lt;br /&gt; &lt;span style="COLOR:#0000ff;"&gt;CONSTRAINT&lt;/span&gt; [PK_CompositePattern] &lt;span style="COLOR:#0000ff;"&gt;PRIMARY&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;KEY&lt;/span&gt; &lt;span style="COLOR:#0000ff;"&gt;CLUSTERED&lt;/span&gt; &lt;br /&gt;(&lt;br /&gt;      [ID] &lt;span style="COLOR:#0000ff;"&gt;ASC&lt;/span&gt;&lt;br /&gt;)&lt;span style="COLOR:#0000ff;"&gt;WITH&lt;/span&gt; (PAD_INDEX  = &lt;span style="COLOR:#0000ff;"&gt;OFF&lt;/span&gt;, STATISTICS_NORECOMPUTE  = &lt;span style="COLOR:#0000ff;"&gt;OFF&lt;/span&gt;, IGNORE_DUP_KEY = &lt;span style="COLOR:#0000ff;"&gt;OFF&lt;br /&gt;&lt;/span&gt;, ALLOW_ROW_LOCKS  = &lt;span style="COLOR:#0000ff;"&gt;ON&lt;/span&gt;, ALLOW_PAGE_LOCKS  = &lt;span style="COLOR:#0000ff;"&gt;ON&lt;/span&gt;) &lt;span style="COLOR:#0000ff;"&gt;ON&lt;/span&gt; [&lt;span style="COLOR:#0000ff;"&gt;PRIMARY&lt;/span&gt;]&lt;br /&gt;) &lt;span style="COLOR:#0000ff;"&gt;ON&lt;/span&gt; [&lt;span style="COLOR:#0000ff;"&gt;PRIMARY&lt;/span&gt;]&lt;/p&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;I will continue to post some more Entity Framework tips &amp;amp; tricks this week while I&amp;#39;m attending the &lt;a href="http://microsoftpdc.com/"&gt;PDC&lt;/a&gt;, and of course post about the new stuff discussed in the conference.&lt;/div&gt;
&lt;p align="left"&gt;Just to remind you all, in December we’re having the &lt;a href="http://www.sela.co.il/sdp/"&gt;SDP&lt;/a&gt; where we will talk a lot about Entity Framework and ORM in general, don’t forget to register.&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=446523" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/EF/default.aspx">EF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/tips+and+tricks/default.aspx">tips and tricks</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/PDC09/default.aspx">PDC09</category></item><item><title>Entity Framework View Generation Fixup</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/16/entity-framework-view-generation-fixup.aspx</link><pubDate>Mon, 16 Nov 2009 20:45:00 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:446355</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=446355</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/11/16/entity-framework-view-generation-fixup.aspx#comments</comments><description>&lt;div dir="ltr" align="left"&gt;
&lt;p align="left"&gt;A few day ago, a colleague of mine, &lt;a href="http://blogs.microsoft.co.il/blogs/shlomo"&gt;Shlomo Goldberg&lt;/a&gt;, raised a question about Entity Framework and large models. Another colleague of mine, &lt;a href="http://blogs.microsoft.co.il/blogs/gilf"&gt;Gil Fink&lt;/a&gt; posted some links to helpful tips for using large models, and I want to talk about one of these tips – using the View Generation option. &lt;/p&gt;
&lt;p align="left"&gt;If you’ve worked with large models in Entity Framework 3.5, you probably noticed that as the model grows, it takes more time to initialize the ObjectContext for the first time. A solution to this is to use &lt;a href="http://msdn.microsoft.com/en-us/library/bb896240.aspx"&gt;view generation&lt;/a&gt;, using the EdmGen tool, which can reduce up to 30% of the time it takes to initialize the context for the first time.&lt;/p&gt;
&lt;p align="left"&gt;If you’ve tried to use the view generation for very large models (80+ entities), you probably noticed that the generation it self takes a lot of time to complete, the output code file is very large (we’ve reached up to 70Mb) and if the model is very large and complex (large inheritance trees are a big contributor), the generated file can sometimes makes Visual Studio crash on opening and compiling.&lt;/p&gt;
&lt;p align="left"&gt;If you look at the generated file content, you’ll see that it includes many if/else/if statements, that looks something like this:&lt;/p&gt;
&lt;div id="codeSnippetWrapper"&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;" id="codeSnippet"&gt;&lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (index == 0)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;span style="COLOR:#0000ff;"&gt;else&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;   &lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (index == 1)&lt;br /&gt;   {&lt;br /&gt;   }&lt;br /&gt;   &lt;span style="COLOR:#0000ff;"&gt;else&lt;/span&gt;&lt;br /&gt;   {&lt;br /&gt;      …&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p align="left"&gt;This structure of code is problematic for the following reasons:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div align="left"&gt;It creates a very large if/else/if tree, that at some point cannot be translated by the compiler&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;The canonical if/else/if will sometimes cause Visual Studio to crash (I assume whoever created VS didn’t think someone will use that many if/else/if statements)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;The whitespaces used to create this form causes the size of the file to be extremely large&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p align="left"&gt;So what can you do?&lt;/p&gt;
&lt;p align="left"&gt;You can move to Entity Framework 4.0 (currently in beta) where the view generation was fixed. In EF4 the generated code is of the form:&lt;/p&gt;
&lt;div&gt;&lt;pre style="BORDER-BOTTOM-STYLE:none;TEXT-ALIGN:left;PADDING-BOTTOM:0px;LINE-HEIGHT:12pt;BORDER-RIGHT-STYLE:none;BACKGROUND-COLOR:#f4f4f4;MARGIN:0em;PADDING-LEFT:0px;WIDTH:100%;PADDING-RIGHT:0px;FONT-FAMILY:&amp;#39;Courier New&amp;#39;, courier, monospace;DIRECTION:ltr;BORDER-TOP-STYLE:none;COLOR:black;FONT-SIZE:8pt;BORDER-LEFT-STYLE:none;OVERFLOW:visible;PADDING-TOP:0px;" id="codeSnippet"&gt;&lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (index == 0)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;span style="COLOR:#0000ff;"&gt;if&lt;/span&gt; (index == 1)&lt;br /&gt;{&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;If you can’t or don’t want to move to EF4, you can edit the generated file and change the structure of the code to make it similar to the one generated by EF4 (remove brackets and whitespaces). Since this file can be auto generated and it’s a waste of time doing find &amp;amp; replace, I’ve attached a &lt;a href="http://cid-5ef5be1ab30a6056.skydrive.live.com/self.aspx/.Public/CanonicalChange.ps1"&gt;Powershell script&lt;/a&gt; that performs the changes. Using this script can reduce the generated file size a lot (sometimes up to 90% reduction of file size).&lt;/div&gt;
&lt;p&gt;If you’re interested in learning more about Entity Framework or about ORM in general, we’ll be discussing these topics and more in the &lt;a href="http://www.sela.co.il/sdp"&gt;SDP&lt;/a&gt; on 27-30 of December. &lt;/p&gt;
&lt;p align="left"&gt;This week I’ll continue to write more posts about Entity Framework Tips &amp;amp; Tricks, directly from the &lt;a href="http://microsoftpdc.com/"&gt;PDC&lt;/a&gt; (Los-Angeles), and hopefully some of these posts will contain new insight to Entity Framework 4.0 and future roadmap&lt;/p&gt;&lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=446355" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/EF/default.aspx">EF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/tips+and+tricks/default.aspx">tips and tricks</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/SDP/default.aspx">SDP</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Sela/default.aspx">Sela</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/PDC09/default.aspx">PDC09</category></item><item><title>הרצאת Velocity בכנס ביצועים</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/10/20/velocity.aspx</link><pubDate>Tue, 20 Oct 2009 14:39:57 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:428775</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=428775</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/10/20/velocity.aspx#comments</comments><description>&lt;div dir="rtl" align="right"&gt;   &lt;p&gt;למי שנכח בכנס הביצועים בממר”ם בהרצאה שלי, ראשית תודה על ההקשבה, נהניתי מאוד מהשאלות, ושנית מצ”ב קישור &lt;a href="http://cid-5ef5be1ab30a6056.skydrive.live.com/browse.aspx/.Public/Velocity%20-%20%d7%9e%d7%9e%d7%a8%d7%9d"&gt;להורדת המצגת ודוגמאות הקוד&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;&lt;/p&gt; &lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=428775" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/_D405E805E605D005D405_/default.aspx">הרצאה</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Velocity/default.aspx">Velocity</category></item><item><title>Entity Framework 4 Lecture at the Web Developers Community (WDC)</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/09/06/entity-framework-4-lecture-at-the-web-developers-community-wdc.aspx</link><pubDate>Sun, 06 Sep 2009 21:29:39 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:398456</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=398456</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/09/06/entity-framework-4-lecture-at-the-web-developers-community-wdc.aspx#comments</comments><description>&lt;div align="left" dir="ltr"&gt; &lt;p align="left"&gt;Just wanted to say I had a great time giving this lecture. I’m pleased to hear people &lt;a href="http://blogs.microsoft.co.il/blogs/shlomo/archive/2009/09/06/there-is-already-an-open-datareader-associated-with-this-command-which-must-be-closed-first-sqldatareader-sqldatareader.aspx"&gt;learned more&lt;/a&gt; than just about entity framework.&lt;/p&gt;  &lt;p align="left"&gt;Big thanks to &lt;a href="http://blogs.microsoft.co.il/blogs/noam"&gt;Noam King&lt;/a&gt; for inviting me to give this lecture, and to &lt;a href="http://blogs.microsoft.co.il/blogs/bursteg"&gt;Guy Burstein&lt;/a&gt; &amp;amp; MS for the accommodations.&lt;/p&gt;  &lt;p align="left"&gt;I’ve uploaded the presentation, code samples (Both EF 3.5 &amp;amp; 4.0) and the sample DBs I’ve used (as .MDF files, you’ll need to attach them to your db to make them work). &lt;/p&gt;  &lt;p align="left"&gt;You can download the entire file from &lt;a href="http://cid-5ef5be1ab30a6056.skydrive.live.com/self.aspx/.Public/EntityFramework4-WDC-Presentation%7C0Samples.rar"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=398456" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/EF/default.aspx">EF</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Entity+Framework/default.aspx">Entity Framework</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/WDC/default.aspx">WDC</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/lecture/default.aspx">lecture</category></item><item><title>מאמר היכרות עם Ado.Net Entity Framework</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/08/31/ado-net-entity-framework.aspx</link><pubDate>Mon, 31 Aug 2009 10:33:56 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:392016</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=392016</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/08/31/ado-net-entity-framework.aspx#comments</comments><description>&lt;p&gt;לפני מספר ימים עלה לאתר מאמרי MSDN בעברית &lt;a href="http://www.microsoft.com/israel/msdn/Article/EntityFramework.aspx"&gt;מאמר שכתבתי בנושא Entity Framework&lt;/a&gt;.     &lt;br /&gt;המאמר הינו ברמת היכרות ומטרתו להציג את הטכנולוגיה ואופן השימוש ב-EF.     &lt;br /&gt;המאמר מיועד גם למי שלא מכיר את הטכנולוגיה וגם לאלו שמשתמשים ב-EF ומעוניינים להכיר את הארכיטקטורה של המוצר.&lt;/p&gt;  &lt;p&gt;תודה &lt;a href="http://blogs.microsoft.co.il/blogs/bursteg/"&gt;לגיא בורשטיין&lt;/a&gt; ממיקרוסופט על העלאת המאמר. אם הייתם רוצים לראות עוד מאמרים בעברית בנושא Entity Framework, אשמח לקבל בקשות לנושאים (בין אם ברמת מתחילים או מתקדמים).&lt;/p&gt;  &lt;p&gt;אם כבר עסקיננו ב-Entity Framework, ב-6 לספטמבר 2009 אני אעביר הרצאה בנושא Entity Framework ב-Web Developers Community (קהילת/קבוצת מפתחי WEB), פרטים על המפגש ניתן למצוא &lt;a href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032424724&amp;amp;Culture=he-IL"&gt;באתר ההרשמה&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=392016" width="1" height="1"&gt;</description></item><item><title>ExpressionType.And VS ExpressionType.AndAlso</title><link>http://blogs.microsoft.co.il/blogs/idof/archive/2009/08/26/expressiontype-and-vs-expressiontype-andalso.aspx</link><pubDate>Wed, 26 Aug 2009 15:37:27 GMT</pubDate><guid isPermaLink="false">b5c4f5bc-c09b-4439-a595-91a98c1847df:387746</guid><dc:creator>Ido Flatow</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.microsoft.co.il/blogs/idof/rsscomments.aspx?PostID=387746</wfw:commentRss><comments>http://blogs.microsoft.co.il/blogs/idof/archive/2009/08/26/expressiontype-and-vs-expressiontype-andalso.aspx#comments</comments><description>&lt;div align="left" dir="ltr"&gt; &lt;p align="left"&gt;Today I’ve encountered a strange problem running expressions - I wanted to created an expression tree that looks something like this:&lt;/p&gt;  &lt;p align="left"&gt;(e) =&amp;gt; e.Owner != null &amp;amp;&amp;amp; e.Owner.ID = 4455&lt;/p&gt;  &lt;p align="left"&gt;So I’ve used the Expression.MakeBinary method to create a binary expression and passed it an ExpressionType.And enum, thinking this is the C# “&amp;amp;&amp;amp;” operator.&lt;/p&gt;  &lt;p align="left"&gt;When running the expression on an e instance that had no owner (null), I got an exception. When looking at the created expression it looked something like this:&lt;/p&gt;  &lt;p align="left"&gt;(e) =&amp;gt; e.Owner != null AND e.Owner.ID = 4455&lt;/p&gt;  &lt;p align="left"&gt;At first I didn’t notice any difference (I just thought the ToString() created an easy-to-read string), but after comparing it with the same expression written by hand with a lambda expression, I noticed the difference between the “AND” operator and the “&amp;amp;&amp;amp;” operator.&lt;/p&gt;  &lt;p align="left"&gt;As it turns out, ExpressionType.Add is actually a bit-wise operator (similiar to &amp;amp;) and the enum that matches the &amp;amp;&amp;amp; operator is the ExpressionType.AndAlso (the &amp;amp;&amp;amp; operator is what is called a short-circut evaluator).&lt;/p&gt;  &lt;p align="left"&gt;This is the same with the || (or) operator – the ExpressionType.Or is the bitwise or, whilst the ExpressionType.OrElse is the actual “||” operator.&lt;/p&gt;  &lt;p align="left"&gt;I honestly think that it would have been better if they named this types as ExpressionType.BitwiseAnd and ExpressionType.And – makes more sense, doesn’t it?&lt;/p&gt;  &lt;p align="left"&gt;So be careful the next time you want to use and/or in your expression tree.&lt;/p&gt;  &lt;p align="left"&gt;Further links:&lt;/p&gt;  &lt;p align="left"&gt;&lt;a title="http://en.wikipedia.org/wiki/Short-circuit_evaluation" href="http://en.wikipedia.org/wiki/Short-circuit_evaluation"&gt;http://en.wikipedia.org/wiki/Short-circuit_evaluation&lt;/a&gt;&lt;/p&gt;  &lt;p align="left"&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/bb353520.aspx" href="http://msdn.microsoft.com/en-us/library/bb353520.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb353520.aspx&lt;/a&gt;&lt;/p&gt; &lt;/div&gt;&lt;img src="http://blogs.microsoft.co.il/aggbug.aspx?PostID=387746" width="1" height="1"&gt;</description><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/C_2300_+3.0/default.aspx">C# 3.0</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/Expression+Tree/default.aspx">Expression Tree</category><category domain="http://blogs.microsoft.co.il/blogs/idof/archive/tags/DEV/default.aspx">DEV</category></item></channel></rss>