<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:a10="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel xmlns:live="http://schemas.microsoft.com/live/spaces/2006/rss/" xmlns:cf="http://www.microsoft.com/schemas/rss/core/2005" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dcterms="http://purl.org/dc/terms/"><title>Omar Besiso (The Archidev)</title><description /><language>en-us</language><lastBuildDate>Thu, 16 Jul 2009 11:12:02 Z</lastBuildDate><generator>Microsoft Windows Live Spaces 14.3</generator><link>http://omarbesiso.spaces.live.com/</link><pubDate>Tue, 27 Nov 2007 13:02:41 GMT</pubDate><docs>http://www.rssboard.org/rss-specification</docs><ttl>60</ttl><live:type>main</live:type><live:typelabel>Main</live:typelabel><live:identity><live:id>8117093178916499895</live:id><live:alias>omarbesiso</live:alias></live:identity><image><title>Omar Besiso (The Archidev)</title><url>http://byfiles.storage.live.com/y1pYW4atUJembaTonxl0CTvAKkmoCJQb8vJtcw5_DCJCeq1n7tQbQEV8dePdBLFcoXJzUGIUM2j0yQ</url><link>http://omarbesiso.spaces.live.com/</link></image><cf:listinfo><cf:group ns="http://schemas.microsoft.com/live/spaces/2006/rss/" element="typelabel" label="Type" /><cf:sort element="pubDate" label="Date" data-type="date" default="true" /><cf:sort element="title" label="Title" data-type="string" /></cf:listinfo><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/OmarBesiso" type="application/rss+xml" /><item><guid isPermaLink="false">70A5B53D721071B7!925</guid><category>Community</category><title>ADNUG User Group – Building Enterprise Applications</title><description>&lt;p&gt;On Tuesday the 7th of July I had the privilege and pleasure to present at the Adelaide .NET User Group. It was such a fantastic experience considering it was my first time in Adelaide and I got to catch up with my good old friend and mentor Darren Neimke. I got to present for the first time on my adapted “Building Enterprise Applications” talk where I spoke about my experiences in my relatively new role in Datacom and some new devised guidelines on building Enterprise Software. You can download the slides of the talk here.&lt;/p&gt; &lt;p&gt;&lt;iframe style="border-bottom:#dde5e9 1px solid;border-left:#dde5e9 1px solid;padding-bottom:0px;background-color:#ffffff;margin:3px;padding-left:0px;width:240px;padding-right:0px;height:66px;border-top:#dde5e9 1px solid;border-right:#dde5e9 1px solid;padding-top:0px" marginheight="0" src="http://cid-70a5b53d721071b7.skydrive.live.com/embedrowdetail.aspx/Public/Presentations/Building Enterprise Applications.pdf" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;Looking forward to &lt;a href="http://www.codecampsa.com/" target="_blank"&gt;CodeCampSA&lt;/a&gt; next weekend where I will be presenting on the Sync Framework. &lt;/p&gt;  </description><pubDate>Sat, 11 Jul 2009 05:37:33 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/5QqgoBsbtmw/cns!70A5B53D721071B7!925.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!925.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!925')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-07-11T05:38:00.9230000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!925.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!896</guid><category>General</category><title>MJ, I, Apple &amp; MS</title><description>&lt;p&gt;One of my very good friends that I haven’t seen since school days (MJ) has kept in contact using the miracle that’s facebook. MJ is one dedicated apple fan and a very passionate IT evangelist since the school days when he was the first one to mention USBs when they first came out :). Lately MJ &amp;amp; I with few other friends had a discussion on facebook about the new iPhone and the Apple VS MS discussion in general. While some of the dialog is in Franco Arab and contains some personal messages I thought I would share this anyway. Please excuse the language in some of the posts, we’re really all old friends. I though I would post as is to make sure the entertainment is in its complete form :).&lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m2fQCd99kKvggTZPiRuC1_WBFyLZ-8kjDs46C8e8wXsqDUZLmGvuyG6yw5yT5oJp7SENjUjGON6a6dpBM5nLptC7O_7MO65YHOgpnDJgR28QwyciUS00dY4jy9DcVg4yxUUuVSn72Iz3MsojSmDYaIA/image[3] 43199645.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mFhaFz3WEgsC2chOW_hVGPempLcg6umvtsiV-4RGjpssaY_02KCS0NAv4PsDyf0515lijmBYjhGbp-ga7wh6_TEv6pTFcQmicKGlhJEsZ4LcnhMn5Qhs4KEd6fNiW3rcVyhfCUQuQZcCx-o-hN2HArg/image_thumb[1] 212D721A.png" width="669" height="82" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mqta5MEMUuP_MPWy7ub7NQ2ggzGe_iviPIlcb_22VuywK6akBdkQD0yOIjd0wwa42zN8Gv8M-Seg_ffJwD376W1_dk5fwqaqfWCYJsBF9cZNePwpeZLB7eHO36d7OPD5N7RMH_nnCf4giZMB8RtUyJg/image[11] 647527E2.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mWOeEaz7dM-wrn6JfDIEb2pu7EOU6-UmVvVvn7MLgcUAhDwiClMIt-V0mqaEHqYFxvmwBqeS65zKk7y5-qHokNGUOQ7wUkoPhQpEfM7WQwyaD6vcWjTtHWS6kwUvAkhDf804LibsSC0LN2XawmxuhmA/image_thumb[5] 270401B4.png" width="450" height="537" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1msc01GiisOpxhfFf4p23rzRITUr19PykR5OtO9nyf1efCRCNJdGMRLyijf7-w2eWX6jSA59cQsbh0yRb3-h2REFkGyInVcc1zpQJMVtva7MWtuc_zzLVXRsIFpFIjFgRFtgPGrd1xY5Y1j-8NBQ311A/image[15] 1A45E331.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mF4-ZTohT_oCEWxCSa0afoBVDVza8oeouY25SgrQ4HK4_vKjONU908BMO8sdgfoOluo_cLvVNMmKDrdmD0ZPl7xreD9z8FO3CtgNaOSdtHtawIjF9uIErctPTlES8-mIHy-nzRDqSwBDxxHud5fg6YA/image_thumb[7] 2B29C57A.png" width="460" height="382" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mkVaLjH_8bEnT3ZgE7jCEDg4dIKzdfcpHYIxfNK8tOqs3JJNTNbdY2LHveiZAYRnZZ5d4TMRVg150aRQr9oDeGqfD-OvIYh4BtKo67ba53-O0OCfw6skBM2PYd1VGI-5yVmq2YpxGWyGLot-zm_YnqA/image[20] 04E419CA.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mlkdR31-PmCqv-X0vx1BHJTnwqOVcLgUoPa-E4kg6QtzcmuleoPtqV7_WfA9lNsc7me-TEl2eVQgRX9ifbwDarThTOVeoAOz8hHYP-zSsGDfUZ6vpn362cJ0Dm4WxnOe3gyUM15Pmi0g0NT4RTSru3Q/image_thumb[10] 05F84142.png" width="463" height="552" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mS4yqU8L0uMfIVb_uVnkvd4QCJPyexf4dO2eK7JiGr8OU8XqFCw4GF62MgjNxHS6ZhhR9imM1HEopkD8wJPCNX9jxDgOxJeUIN2VxuhtEO6dCSkixJKyEUYjq9uU3ZiXK6m5-OjTYpGIU1j4z8QodtQ/image[25] 09D21DAD.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1m70SiKBWyfTNoJtm4t1S-u5Sb7mCrYUjmd-RuZW2ATH8BW_8o4WGDzx6H7zrE7hbWjUI0fZ1q-4cqiXAQ1d9Ukzdgpk0Qe67QGyvtHzCaULsU2JNhtWP59JWHOdxToAdi5igUWkHdSxTPC0V5JC4Cgw/image_thumb[13] 5DD15856.png" width="474" height="585" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mn381-DGzptK3APLJYDRtmb2gBEzWacotDFj8q3RdsSVkkgJohjOApkY24pLMVC90KrzX-sSTGL0bpR3qZg4_e059BfqF7OVdVJg9PcQ6uO7JzZQONwe3JUkP2vz9U63-NaFjt9kAeoDrFyL_FTliFg/image[29] 7AA70506.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mpJ7W_Q5h8Bm1fQz9hcHsK46pyPMJaCkwTPc2vsWYZ4jqhzGyrqrXI5AQZs3ni4WaNUiHEsSwZemtJyzazsMrFjbskifh4HU_84IDbcuRZcpXMCMrdo3-D8l0uNC1dbFMU7Iccm0_REaRGlEB7ax8Sg/image_thumb[15] 35AA6F6B.png" width="482" height="525" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mCVUo3iGpwu33UZu29mZUhKPlHzIhzMXwqSKK2CivBxetKEVzvBjlXS31fgvTzkqp7UZv-miyQQawimJNTfHUL81jlOI-9m_dJ_Quy5ZGLp1Xn1WP1bYwkGir0vllnlXrUu8jxfxY49iDsyDWlVzpkg/image[33].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1maZfciLyxv3EpdppaodUtq8Cx2xalXrnEZhX9jHkyaJhwpTp8OyoiIPNQF5sB69XtAWjA2d6T9HJ2YqCBbfS_Laj6xqHrlhHPESCKuAM2t2EhPYOKbmX3JWIQeEQ__5Mkrh45BCVENHrF7FvbFPNxJw/image_thumb[17].png" width="491" height="371" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mOouZglTMn-637KXwoMng5eNYqs2rlNrsMqafj6Ud_QzFOMhWC-WVXY1vXBlEHaLq9F5bfw9nOkQW0d1gfW-rpOF6xXJwb9bTfozp6mclr2igz5Qn0GMs6tyBAvQYz4jtAKRWS0Ww0ctvCTrE3lO3Hg/image[37].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mvZ1p0IaWXF1ZoHGw-nr9aOfbsUB2Uga9LfoW65kWxI3H445RsqJ_kJInXyGIZAliEh3glk_uf5CWNtmlaxpOaoUFF7R0D32eYNBxUD2Fv4CgtSG9mvEmliEB3Khgodi2xGcnkCoHa4XtuGtJAn7wGQ/image_thumb[19] 14AED4C6.png" width="500" height="506" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mQiDL0lnf-zzLvWfQh9EFCVQFO6XBhVaRAFZdMh3V4K9d9MHqxhKyj3900iqRVDXlqBqIWxaBPqX6Dl3Yp6oQ2LFaFhm4AABQxcEvbbcBYkOk8gZ0B-_w6TRvs4Ho8u2sSFzPeaWrQihK-2B6z-Ntbg/image[41].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mkLG908osqkusiOibrbg5Wzh5ICPnf2DBiu-WpPbL8JyDxqnvAtH7tIhZv7nF-4kY3MAieWmvmLzVcOxccraV0cO4OLljmCQZr_BsJ8UG3ixKYB3aNFwVW-PFj5yun5eewY2Pq1OZCVoz0OIPL6UBug/image_thumb[21] 6A9A9CD1.png" width="501" height="609" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mGSD86VcFKDrdsUao5vAL6SFt9kRdjG15MZZ2WsYJa6eE7vaiJrCZHsSfu0LZRCSgEUAI9dc9Cm9f0Rdik-WORS092lqbrXwN_ceNOWzdhqiaPnQlUx3TazeaWHcYSJTV7zN2AUS9H0ijiJz46Hjlfg/image[45].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1m1z7j7-C60afC65q5Np-H5Tl1y3iumiHHICymY1tY6jVNyIbYYbiBsdUlHuqwoiTeMXo4Uy0Xmktj43uPzHcwXZQBu6xi4SonP_XjvTwtkXXBFB9I5lAIRvqmLjtWliWNREHEvnrhq6pmi2OssX7s0g/image_thumb[23].png" width="521" height="600" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mc_tdPVMPVPPOZGDRNOuIiZSgrKy-HQJooGfBJvnZIQh1Rzt5gi6Lyb5eOlUS7TvfbhdFRXgyJ9b52Rny-57Yuxa1doi3f1sN16C-jMSxLlfDBE9VRtA-jfnBNb1Htb_er0nsnnnzb04us6Qdv-6_0w/image[50].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1micgHHY5HUUkP4nvka7fia7ldT42NwViBtOsGCzbxDMus6uy_parmAqfBw8YRXkxUW2FVUA58CaJvXAulmKIZZPAsVNGOJ60cT12p4kMtK-WoVerS8IAkYJlerT25stJSjxrcSFK1QBF_MHwK2FPmQQ/image_thumb[26].png" width="513" height="605" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mFKjlXh2bVg5h_TasjsDHYj5hsP5h5mrIbA_qBNyS_TArB-eS9m_8pkuQvq1WRmLheeqGAmlYjww9eaK92KOKpoBhvluZbPjDYO-GuN9wYESpvxDLY2insWM135bWifDFywCeSbQQVtIG04_tvwzejw/image[55].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1m2jXb2zMHCMN_v9yMZ-B0qmCFUwKbz-tYi_LGRZGmemOW9wliz4BfhSeE_6qoRsUb0bGIsCX8SxncBcwlG3cbyoUUEiLRq5ZWUsJA1sGUffv-pWzIdNg4SnHGCXM-tAfljgR1Y4Oyz2bR1CvhQibUdg/image_thumb[29].png" width="512" height="584" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m3W1Hnw3DH7GAQgBC4D9dwS5Ud32yOr2k_N2Om-bACCv_eKD37TnjJ5x2DwWVrZOa7MEjsm43diFyQlObqwwotIbSTTP686zeWEE3B_E0X3qOfEC4U-7VOCbd76yXJkt-39ZFiTeCuq3Ahv95vnOqDg/image[61].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mYB-52byGT5Dm7YZwk0R-0ffKI-J0FRhMSv-vdHuZrEQ_wgnvQogVwBwTeCDtmRBeqD5taf-oxlBmvSLAHRMsNiRM8DmYiRewG8_kSHP2ClDsvtVi7AN-YNGAmXV7hnnqa8YyO0FNuqHP9oAg9ne5ZQ/image_thumb[33].png" width="505" height="611" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mr4sp6b4LCBMZYCZsRhiveUKfdUIzvqhhPyT4TH2UIZSmRikgObksocH_8wYOf6O0fLgpfSiEFBGdoZT5TMgqrUyGXwykIbRw4aDXJmFysUILlF7PYPcmJAgl-AyiYrnuuFFcZ2yTAi75opbUzPDaeg/image[66].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mhl8OyJvQieKkhUKv71QeZo2rTG7H0GLimrMtCKQc0n1f3m7fo4D1StnvAjFsz9-KEmJ_WagzQgQL_cBCPZS81a0jGm9Q9sTgixDjVP1A6VsffdJk6vjjiSLdAZSg5DkhEp-aodoHiww-AGWW-OGEcg/image_thumb[36] 67D8A77F.png" width="495" height="568" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mb0rlRjtX0Mm8RNqQzP7e8lsEk6JcEYrY5666GeBmjO_BAFTGsSFYU4TWpvB7JXmzohvfq78atrYTb5Jvt0DBX3FK5R8j2iq1fsXAueKxTWoHDSKv1ZoeJLq5q6UMcAQ45FLVc1OnMdkkZHl-kN2vRQ/image[70].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mRmz_u9bazMaeRwrxN1KLNSHBhJOIC5N78El9nZ2KMH32woihkQL4I_U3SfQDEjRF2RlkAn0_v2G7eQHlTad79LQ-L2eRtlcpQ0onbzHmgLyVdafrhZ9jV4RfOxZ-4drYXWclb6_GhVRJblF2GQ50SQ/image_thumb[38].png" width="499" height="443" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mkoFLbvaLtD-NdrwhqR6Ve5y_zNVxx44Wx5v7pRrY_fn_S_5Zi0K6YWUjJJQHOb8CPUe88kB7_21JzS8Idk6GVqoKPzhWEq-vvRGSYR9fa-u5Yr8YlEvgV8VDlfXsVJeUqRjfGhra2gmd6RH0bjglKQ/image[74] 5B35FEF0.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1m4eLssgtWa2DP51NHypzX_b0uX_aqep5LK7J9EZ9cdpfATyZtHMZEqoPryi8P84-ok5G4MJLR2fbCwEmvV9TV1jDTaH3vEHj4o9731VPt30C-lYGNa8T9GueAD7ROEibRKIj32vv8WO0iD_hcHUWEtw/image_thumb[40] 2162F39F.png" width="496" height="616" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mqiBHVlGbZiLlOhlNKPMl15MFgPxkBEA2L05dL1Qv2UVbE1N39F14Xm0AG7lJoK9O4gvs1iwzahDtU4zOs1fjWUUUEJkctJPi-1n4UgkgLjR-felrDiKgRxitOIKPLz-_IBuWdpOfo329IoGnpK3VSA/image[79].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mCNkxeD69WOsDorGZxDcc06jz_luz86tGIpZVk9mH7Ryl8462pKU2XtIpdACS1wTLPLoSb1Z87TCZK0raK58fU57lVDdCK8WWTjNu2Vi_G_qSpH6Rnmt4aluZG3VUjoxQ-7yU9WJKPviqg6oR_EabGg/image_thumb[43] 721CCE3B.png" width="500" height="624" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mE2z1d__g009QyvRbHe3Agk8q9gmREh8cGq8A-E2McgfpDTV20BWM_PexODQTwupRsmLLZffQ6929j51EI2LdpzBlzvnewp3Jg2yGjnggXuHzOhNL1e2lqGN4cnf7n7YHAF9SIhPzBg5Rj-bJzgASkw/image[83].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mxOuT4-HvuU1ustnfjzqFNmKB-9WTmHKz8E8ScXQ4cl_2u8tMYobaIIITYkOJAe7j2PEaCDu6MS19tUMBaDhzYXDvzptdsqjuaRzqh7TCWYoC9F_YntTYlfTD8xXc2_HrMV3LhFxvMNXhV4T7rDfFLA/image_thumb[45].png" width="509" height="273" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mF8BJymtapLhARCmGU7tj7-KnszZBiELyu17fgP0jQ43_R2qpaaPC6bMTCzreXArg4bNzE4jLFtPQVhKYdO4Y4cEXCAZzjW6aa_911ufFZGZI2owlK0ESXx-9g74EtWX_zUTYEFBSujr41BoKzINxtA/image[87].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mSRVk7gh9k-UdE32w9-BE24YBbkBElcivMPP1Hr8R0gXU278mxBOt38wItn7hr3y7XczKLW3Sk-pDIqwtTDnAcMSTFe4NzSU_zUaZJOWH0l3iitr9YCbzb817RIYWDhOihj-3fv7GH7dckb4Ieij9sA/image_thumb[47].png" width="517" height="496" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mzwXrmdtMkZZB1TzCa14WOJqAA2Yuju2KA0QhEIQsQ_Yk0b85oVp7Ui2H9XybWnBSUE4pvaEgIySlpB9zl6umZjHlKvNtmXfG_TdB13jTtRKj84DLGb_DIIuq4nhjBjhvmSptfId6nOhFu41PMmuiCw/image[91] 23036F77.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mYEycAhYGZF1qWFLQapK1ZuWIlDmHxcXSrEgmsrJCvxrFwpsbQZLkqAgx2cTvEByvo4gpNuRFR1tIcSezdX_FDrp6OP59QJXOa8tUYo4nUEEOsrXNKaQF5JsIpKv6lLgPJAQMeIKmz0uycravIkPJHA/image_thumb[49] 304936E3.png" width="518" height="503" /&gt;&lt;/a&gt;&lt;/p&gt;  </description><pubDate>Thu, 11 Jun 2009 12:56:37 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/SpmjRefJJJI/cns!70A5B53D721071B7!896.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!896.entry#comment</comments><slash:comments>1</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!896')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-06-11T12:56:37.2830000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!896.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!847</guid><category>Architecture</category><title>SQL 2008 &amp; Sync Framework Over WCF : With Simplicity</title><description>&lt;p&gt;I am working on a project at the moment that needs to keep a local store of data in order to give it to ability to function when the WCF service that feeds is offline. Once the service is up and running again, the data needs to be synchronized back to the server and any data on the server needs to be synchronized down to the client. This is becoming an increasingly demanded functionality as we see new projects. Now out of the box the Sync Framework will work nicely if you got direct access to SQL. But as the requirement states we have a WCF service sitting between the client and the DB.&lt;/p&gt; &lt;p&gt;In this post I am hoping to show a step by step approach to create a bidirectional synchronization line between a products table on my client and one on my SQL 2008 server that site behind a WCF service. Directly from MSDN this image shows what we try to achieve &lt;a href="http://msdn.microsoft.com/en-us/library/bb902831.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb902831.aspx&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;Note: This is not an entry post of the sync framework. It’s just an explanation how to use sync framework, WCF and SQL 2008. Source code available at the end of the post.&lt;/p&gt; &lt;h3&gt;&lt;/h3&gt; &lt;h3&gt;&lt;strong&gt;Install the Sync Framework&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;Please download and install the sync framework found &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C88BA2D1-CEF3-4149-B301-9B056E7FB1E6&amp;amp;displaylang=en" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;h3&gt;&lt;strong&gt;My DB&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;Nothing fancy to see here, just your good old product table with a couple of rows.&lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m6WjaC5M-hSJDnZpiAPYDK8cK1-tjXIsHwO2_doLn6ydSPEIlWlO8IosjRU_uY5yoPf9UK_3mVxQwzge_letQUvFG3dO6MGBxKdZwpd4vOtxuG66K0ocFK2YEoPWJL8_mJVvPhjLj6yZU74qRE81KiA/image[10] 27EFB59A.png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1m5SBA46WtEJ625rVGqtEPZO8pzXW_U9XtFfmcP6rWBozSAIyzllDqxnPiG8OzvUYDG1-Bq0_WQpiC5IlFODnvPpQfH-1tOmczIo-bEbHvT-2tp8mVxUhzUGOwxBbO2-gwtX-xe5sKDvewxeYjYz83Jg/image_thumb[6] 54487419.png" width="479" height="115" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mi4wpLrpbP_z42Ldt-ZYtrBjFQiY70kwcE6l8LHQ7Qm8NcNaZzjEeeOyw2ufmHtbNTLvoTu9DZOnudZ92FODgbFDWSbyWEq7LSQ_YKqVBjjn6KEEp4TUC0eKvAwGiFu5TfB0mlURF35kgJyyX4qOPzg/image[9] 09611518.png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mEizvW9w5mXbJDjGGYIwJsuBe65OmmfPHH3qMMIZaEgBroS2GfOowPFT4tLMzGWf6S-0mI2GPYmtPPiSDAHN-OE1SO3faQFUsTJ-ThEB18pQHumquYyc4U_zQ1w89zpmbjclMSsB8_0e7zEwZAr7kRw/image_thumb[5] 49B3662D.png" width="482" height="106" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;There is a key thing to mention here before I continue. If you are using an SQL Server older than 2008 you will need to be manual change tracking as explained in the link to the MSDN article above. Otherwise SQL 2008 has got built in change tracking features which provide sufficient change tracking information to our scenario. One option in your database you have to make sure is on, is that tracking of changes is enabled. Right Click your database and click properties.&lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mwhaEdEsCqwHZLQh7IAYDevNGZgX7u0ufdM953ROOMmTZ0yEfm97yN--AUqwk5fJ5buY0EGktZ4Ktl1Iy1phYtSfuN7VuSNFQuY8ZN0hrtP1VZw_tWQ0ZDFBPDWK8bkhBrvOpzNiWGcyQSoCoxPtwqQ/image[95].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1m3RGIOCA3lsIQswnlqNBaqBi2ACNASssPLW7FNkJQ3HaJSE1PtfzuiUijol-RjHit3NaPgCQp_WapLMUyiqOPe4lfWUZxbVUppPYYWm1uM6aujN7tMbey0WUXmWDxx3NmnAcA-ffFjw9MmG1EbDkXNw/image_thumb[51].png" width="552" height="155" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I created a data dude project in my solution for simplicity of distributing the demo’s source code.&lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m6RCp4WpNAGiEaS5PPHssv6baWLcdDCyxnq9HhHHaIZh5f31nW7Qa68SvNTsB9EudnqKBk3XxWD_5ZuUMf5d0D_o-P128oRDa_YwyqaUFQMLEvpplAKKPfXtnds6jYEXbvm-W6zjRZqXvBmic9ihV2Q/image[14] 187BDDC2.png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mMeyIvh2YR_FKPkNOLjWik3ZSKnmzYP1yQykp9MMQKmubCfrM2n1SZInd0AGOtqENWOwQfM9cDWPEz7j_U0AzqjHHe4sJMQDYZz5e8TmV2DFFgy9ITmqPTFes6Ur4PH67bTKInIp37UdC_JuaKb5kgg/image_thumb[8] 751B70F7.png" width="318" height="63" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;h3&gt;&lt;strong&gt;My Sync Service – Part 1&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;The first thing I need to do here is to create a WCF project and add the following dlls as references. This will be my sync service.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Microsoft.Synchronization.dll  &lt;li&gt;Microsoft.Synchronization.Data.dll  &lt;li&gt;Microsoft.Synchronization.Data.Server.dll&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mk-q10F5Q6cSS_BJ0YFLjTP3hf2ZFmd6cDpksXseZ8SxvKoW8ZRCYxhUcK-m8_jW-lh3zersJY8F92yiu7GDfBQ4pcOCP0Hvj5wTTCM00G5jKjb0Xsbu5hehD5bOQiPoOMbeq1MOECDB4Jc8NxvLwPQ/image[91].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mZKfbNck5KyZLJUpZuQFLTlAU1NnO6ZUcwCfO3RnmxzQIr7os4AQan7oRA0CGJA41QrH9lA9-kO50KJkenUIs9fp9ZcMO9QrMUCPOgjMBSw6hHiFsz9u1XwfCHFNIUnplUnV7bk9pG1Af6QzKF_dhDg/image_thumb[49].png" width="277" height="289" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I then create the following service definition for my Sync Service. These methods (service operations) and their signatures are what my client is going to be expecting when attempting a sync back to the server.&lt;/p&gt; &lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Collections.ObjectModel;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Data;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Net.Security;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.ServiceModel;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.Synchronization.Data;

&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; WcfSyncService
{
    [ServiceContract(Name = &lt;span style="color:#006080"&gt;&amp;quot;SyncService&amp;quot;&lt;/span&gt;, SessionMode = SessionMode.NotAllowed,
        ProtectionLevel = ProtectionLevel.EncryptAndSign)]
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;interface&lt;/span&gt; ISyncService
    {
        [OperationContract]
        SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet, SyncSession syncSession);

        [OperationContract]
        SyncContext GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession);

        [OperationContract]
        SyncSchema GetSchema(Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; tableNames, SyncSession syncSession);

        [OperationContract]
        SyncServerInfo GetServerInfo(SyncSession syncSession);
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;strong&gt;My Sync Client – Part 1&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Now I come up with a WPF client that displays a list of items from the local cache at any given time. The idea will be to synchronise the local cache with my server’s database through the WCF service we defined earlier. &lt;/p&gt;
&lt;p&gt;So I start off with a simple WPF App.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mTqiHims8Q4iBUwQiO_3aQU0zlUJ7ql0mf5HhP44W5O5ptOVl1mWHmsW747lU4R4L45fYgt5c4R_oyR_epgCk6727wBAhEk-CbrlbIy9mFrmdQsyA0Q6MhoOnQoMUsdlFAyGVTeeLoVC8SvBc6MGnCA/image[26].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mqCFt88Zld3-AKZeHCrTSbj2jSJZkg_sEZlXlO9Zbez5N_C2sPEdqFqDL4LjPy45FvyTnN9ZzH95BzuYCiFldiyGsAZTt-nldc7EmWLmTde9zwIIMVRCfbAQnxwPa2yrGA-eBD9D1kY5ss21vcCqVvA/image_thumb[14] 53FF8AB8.png" width="254" height="197" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I now need to add my local cache database.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mrNUbHPHkShh02SilAi17V-nP4JkL_ZZ_7l6gPrDWRBZqgm2S8Yky4-YlLRcqNhybjJ5SfXF6amxf2G_IL2nXoqn4Lsu9zly9edRatW0V8kNZULARIuYj8YfVn0m95ekwrF7oIiwUwoFcploW7x8bLA/image[64].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1m_C9jDGpZr_IPj3u-KVEdTOc-DvJN1zjYpQm5HkguhLotTEW5wQUZkA4qevzL9a0E-TaQRAhE_V4CM3lDfyelKzSfX3Wvr0H3lLP0OGXZyaIJZ9LUCUmSig2gBjEaELzTbDL_ZWyzroXPv1NqF0mFPg/image_thumb[34].png" width="676" height="158" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I now get presented with the following wizard. I choose the server’s connection string and a new client database option is given to me. I then change the project location of the server to my previously created WCF service project. &lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mefQcPstXKLOGDjZj6USBDSc_uHZasE_WZxOrQUCA5Jm2asZEhqi0k35D2iW7lV5lpQxA689Rl-4KiV_EgfIdClHq7PbZaQwcP_WdZdMw_K-HfPd56apHKx_w9nU9rQm3_lqsKp2eCUqV3CXUrqVIKA/image[35].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mGa_h2N7LhCP-RaAjhHDV53DKlx2DYOW3miyOUJ1RB3E6gqw8Ne8t4yDUOK4cvviFF1zVmM5m28Hw2MHF1HIbcoHBldN0Qo3yY_XWInrg5L6cW4vK9IdfqJQ9ZnuTyB4JKxmr_MTpQuzleawqY40GXg/image_thumb[19].png" width="785" height="566" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;From there I choose the products table to create a local dataset. The steps are outlined as follows.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mjUZ-cPbyyy_uEBnP0yDWEWHykkxywWpOj6rTlxCy7XtEgVgBmi-4CucUU1W-fM5Dn5qW6zz2DH7uPQmqQaQtnfj9T4OGny5IBO_dJ7htLnv_g3KHv2bFrtvxirgEag55EVBvPlIOJSa56eSx1LZIWg/image[39].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mUj3SPgfMRq3g9KJA5Ha1f0N4zHXSJh5vh3owxXWI-YnoJ_v-ykwMFUmsbElK85rQV-ZT_YilFtL3NC3ntluj-VP13gS0qiX4hQBCOVjXlPwE__owXmCw65aOXwcKEGvCYZQQnT9YZC5JWUA_9uJIGg/image_thumb[21].png" width="791" height="519" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt; &lt;a href="https://saakya.bay.livefilestore.com/y1mW7jcnNN5OnbKxFkuk_6EXxlcRcNHG8t_n2_CCxmKHGk6sQ-606pAsS7iet4lVrBRZQQUwamsKFOAPotfBFOdnZCdZFbQk_BcM98cbstnmyRHMJcfMDpx3kY96H4oe0DAyqzFXUCt4sqZNIvGJxaLFw/image[44].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mFs9eJUNCIfu1OWn_DkwmQ8SEr3A5F64sLApGOGS0BMpAteFiyETjjjq1_H-6hbTaEtBiANqkke0iBzbjM-ftfcm5g_HLSV99giSsoP28J673K3Sqg5t6yum-l--u_5_gLQ3qOR43nAYB4P0Cm5xx7g/image_thumb[24].png" width="777" height="478" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Select the field I want to include in my typed data table.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m2hLsMyhtc_cJWpr6yB-1DIXwbbzUgwqve9MoYCruvZTQbyHp3qWVxTvTwtToruc7woszNnM-AgIN1QesesdkhKpjUgIV8crBr3NcWTckHWfC8VX54xAU6geA7yUvUWavCjR_m6TyMgdCliVNPAT__A/image[49].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mGjP0i2h0y0jE5zIJQLKco8xnmKSF3ULZM-ziV7nl15HpeRxOdet7fqhOs2viCXD4eAN9jLw7SOVhUrGZYomw29m2dHaEgzebdOlm5QpZ1NzgQrzkR2r3SSuw-dwHm-OnZgjRa3eHAN59I2gLJb_usQ/image_thumb[27].png" width="776" height="599" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Viola! Not only did the client create the appropriate cache on the client but it also created the necessary sync providers and adapters in the service project as well.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m0DE2uWcoRPj9UaVso_64uH1YU0_EpAlpHpuWKWykWjuuNU05r1RcpEMPpGDbYYcYB_L-bwuEMtBHBpG-1E-dY8rKOZnsERS2erWCJnBdx0XK3gNu6iDFrE6tyhyW63M79EvJtatY6Nz_CdQpWzUkyw/image[68].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mBUw76GZPMifOEyrmbZKHiqoOpZ7bMBqpocbBBxYDDPv2bQrSmGVlT0HhueHLeVy2MXJ0-yIWwYZ6UXWwmn3r0PqF7mMzGWlKIpwTn85Dx6MeDkqsFiiRMmM2-vHO86yevF4QKx4QZZUCtTSE3cVnow/image_thumb[36].png" width="344" height="448" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The thing to note here is that my client is still not configured to sync with the server. For that I will need to do some minor code changes.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;My Sync Service – Part 2&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Jumping back to the server I need to now implement my service definition. I do that by passing all of the operation on to the Sync provider that has now been created for me by the wizard.&lt;/p&gt;
&lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Collections.ObjectModel;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Data;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.Synchronization.Data;

&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; WcfSyncService
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; SyncService : ISyncService
    {
        &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;readonly&lt;/span&gt; ProductCacheServerSyncProvider syncProvider;

        &lt;span style="color:#008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:#008000"&gt;/// Initializes a new instance of the &amp;lt;see cref=&amp;quot;SyncService&amp;quot;/&amp;gt; class.&lt;/span&gt;
        &lt;span style="color:#008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; SyncService()
        {
            syncProvider = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; ProductCacheServerSyncProvider();
        }

        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; SyncContext ApplyChanges(SyncGroupMetadata groupMetadata, DataSet dataSet, SyncSession syncSession)
        {
            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; syncProvider.ApplyChanges(groupMetadata, dataSet, syncSession);
        }

        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; SyncContext GetChanges(SyncGroupMetadata groupMetadata, SyncSession syncSession)
        {
            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; syncProvider.GetChanges(groupMetadata, syncSession);
        }

        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; SyncSchema GetSchema(Collection&amp;lt;&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;&amp;gt; tableNames, SyncSession syncSession)
        {
            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; syncProvider.GetSchema(tableNames, syncSession);
        }

        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; SyncServerInfo GetServerInfo(SyncSession syncSession)
        {
            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; syncProvider.GetServerInfo(syncSession);
        }
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;My Sync service is now ready to roll and I load in the wcf test client just to make sure everything is alright.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mzfgYcrIeKeqGZoigA-hCI6DoSGTJ2UJUEErKrBfbHyI6iNhQmquW-7T-O_O7PJWnLBRrc9SlvtAs_8ia9oR_qUGUHecH1y5gSI6q97cncMcEgXOiqMdE-gNXmwUe1kP_6GqBOfoBBcT_CpD7FBKBuw/image[18].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mO0dPjk4U005Q9VvI_EJY40YBzxQokshfoNGZPnuufaLYN6B4CTZwWe-jlubWQEDAJzcVSvZmCNLcyTj_pfjCG0u7nkeHA9irtBDAKRM5MRzCp-7BgcPepzRFN-Cit9gRThhXm2svpesEqwto6-otxg/image_thumb[10] 477803BF.png" width="448" height="331" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;OK so the mental note here is the service does load and it does run but the parameters are not supported by the WCF test client. &lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;My Sync Client – Part 2&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Ok now my WCF service is ready. The next step is to configure the client to use the WCF service for the synchronization. I now add a service reference to my service from the client.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1maoiOUsJn22CcmrrdZuZZs2fK0x0JJY18zfSIm6-y9a5yU85ggiGnMHBqyILXkVuYUfyrLHGd0YmDv5VS7yt_m8uW56Gfgm4-SCzQzciqZqJqYdmbsjAnCRB62oXZqYyYDwb5ZtRNegQnqRUP3EAR4Q/image[74].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mlDTG_yDrCY5wQyMEzgAVRmJez6B5-ibkdsqTlHaX622ksBMUWoiwfQbXwuT6alvTQI3iyzoLTx09yqUkPhfofU2HwVUR9xFguj62NNHXBQg1HGxK0GHhkMotYrBxQU5drZLHpIiqTtEzMFJdAbazSQ/image_thumb[40].png" width="620" height="494" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m3TpIHCVRT7UwDyNr-bwaST8Hh0GqBbSSkaom1KD_IGxncTZOY1y_8g0ELRL5EaNhZq5c7bnzCADPa7VLG7P2TAGPEukNpLp-sWYFP09P1-wNQouOf7dJE1Muim8x0SchO64WLaKJ_MIOQLmOxPqiPQ/image[78].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mW-d0BjDA5HRr_e2rfgo-JYOk-PybyQ9Qh5Yz6MIIBAoaH4haqoYtGfN9RSChp8bqoe3qzKZx1iN4NHfga-1Ltn6EotLl_7CtuBuZSp23DUPyXkgYodhpt50At9b-Zu665gqnBkyCGQm80yOyZs6C4g/image_thumb[42].png" width="379" height="346" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;One more thing to note here. The wizard will always create SyncTables with a default SyncDirection of DownloadOnly. But in this scenario we need the table updates to be Bidirectional.  The trick is to right click the ProductCache and click on View Code. A partial class is created and you need to modify it as follows.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mEGzMqi832-g_FTxnrXk2yhA6H47oIwopu0y-D8J7Lq7nl9dRqSstML45HPuL_B05NivD41boyFUsX4ZFajpilwTc0TC48WyGy_y8HtkJ6hBdEpxr27UVHfAcoFs1h2nsKiQq-5lDDjRPO1YAfnUECQ/image[81].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mXESVJ8UqmqEy4SZ3wNfDOyADbtfM0rG9k8P-s1f47ixpuY5_Nu2-Pwzo-cR3wxLfl0YTlldJa1ABVn6ctwLPp8NB0Apxag5hgbJ-hv-7Sek0B_GsnYlNbnGPLXcV1IITtkZ7wwHARh2gRmMl5U-JAQ/image_thumb[43].png" width="238" height="71" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;&lt;p&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.Synchronization.Data;

&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; WcfSyncClient {
    
    
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;partial&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; ProductCacheSyncAgent &lt;/p&gt;&lt;p&gt;{
        
        &lt;span style="color:#0000ff"&gt;partial&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; OnInitialized()
        {
            &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.Product.SyncDirection = SyncDirection.Bidirectional;
        }
    }
}
&lt;/p&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Ok so now all my infrastructure is ready so time for a semi pretty UI for the display of data and operations.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m4cqKFEaRWQIembp6u93l27D_0c2zVYWFgH6b_M805EGzp7Oqn-j93YhbBION0Z3Ipz7Hgh1xiWGZm4KBILXCiDGd7bskZ3CJU40vtWCFCD0gzGJI0xHg2_38dQ2_s_L96dB1qfinIG3GbhfSF8Pefw/image[86].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mw6rDkDZyvPYU0e00cqOOZwmF07brKnah0v1X48EqthV-CudpYB2r8lwlNHL5FrEJ05aPC-ljkMqYVTUp4VoHGqKJG-lJq7vR0SJdfx1q46-t4b0xKKrMIuQ24do7nF16pxx-12LC4Dx58vkgtiKgMA/image_thumb[46].png" width="732" height="465" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;It’s pretty simple what happens behind these buttons. The main thing to note is that I am instantiating the agent using my WCF client proxy. This basically tells the sync agent to use my WCF service for any synchronisations.&lt;/p&gt;
&lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Windows;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.Synchronization.Data;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; WcfSyncClient.SyncDBDataSetTableAdapters;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; WcfSyncClient.SyncServiceProxy;

&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; WcfSyncClient
{
    &lt;span style="color:#008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// Interaction logic for Shell.xaml&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;partial&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; Shell : Window
    {
        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; Shell()
        {
            InitializeComponent();
        }

        &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; btnRefresh_Click(&lt;span style="color:#0000ff"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
        {
            var ds = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SyncDBDataSet();
            var adapter = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; ProductTableAdapter();
            adapter.Fill(ds.Product);
            listBox.DataContext = ds;
        }

        &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; btnSynchronise_Click(&lt;span style="color:#0000ff"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
        {
            var syncAgent = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; ProductCacheSyncAgent(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SyncServiceClient());
            SyncStatistics syncStats = syncAgent.Synchronize();
        }

        &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; btnAddRow_Click(&lt;span style="color:#0000ff"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
        {
            var ds = (SyncDBDataSet) listBox.DataContext;
            var dr = ds.Product.NewRow() &lt;span style="color:#0000ff"&gt;as&lt;/span&gt; SyncDBDataSet.ProductRow;
            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (dr != &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;)
            {
                dr.Name = &lt;span style="color:#006080"&gt;&amp;quot;New Product &amp;quot;&lt;/span&gt; + (&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Random()).Next();
                dr.ProductId = Guid.NewGuid();
                dr.Price = 800;
                ds.Product.AddProductRow(dr);

                var adapter = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; ProductTableAdapter();
                adapter.Update(ds);
            }
        }
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I can see by running the application the SQL DB is also getting that changes as I add new records on the client and vice versa.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m89ZHMIGFRJbn7R89-d_ar3O2Z3t1Dg-ggqDhkkbf1OAuGVwJHpgFJ83TtB0ohD646yVSHBURVdEinLOXrgBoPP9z49rwrg_6KbVn9tFATI3y_hg9mNTIi1sRsGZu7OUMimYWFkWJs19jYDRX2Rcx4w/image[96].png" rel="WLPP"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px" title="image" border="0" alt="image" src="https://saakya.bay.livefilestore.com/y1mGbZ5F0jCWOgqiPsTO_aU8NoQ3H7F1QMcTHmOI_ddxjAKzv3NHskDcbM65sNbd43GzBEeVxRffTTqcNVbkb0mlV36JBoSuvU7-gMdq73GXqIixoigiZs7aqVzvyPxQvDyOyR_aFCwonu2io1eit00Kw/image_thumb[52].png" width="512" height="195" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;strong&gt;One Problem You Might Run Into&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;One exception that you might get during debugging your application on 64-bit machines is: &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unable to load DLL 'sqlceme35.dll': The specified module could not be found.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is related to the fact that the original release SqlCe was not supported on 64-bit machines. You have two options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=DC614AEE-7E1C-4881-9C32-3A6CE53384D9&amp;amp;displaylang=en#filelist" target="_blank"&gt;Microsoft SQL Server Compact 3.5 Service Pack 1 and Synchronization Services for ADO.NET version 1.0 Service Pack 1 for Windows Desktop&lt;/a&gt; 
&lt;li&gt;Compile your project for x86 CPU configuration.&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Clearly the first option is the recommended one.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Source Code&lt;/strong&gt;&lt;/h3&gt;&lt;iframe style="border-bottom:#dde5e9 1px solid;border-left:#dde5e9 1px solid;padding-bottom:0px;background-color:#ffffff;margin:3px;padding-left:0px;width:240px;padding-right:0px;height:66px;border-top:#dde5e9 1px solid;border-right:#dde5e9 1px solid;padding-top:0px" marginheight="0" src="http://cid-70a5b53d721071b7.skydrive.live.com/embedrowdetail.aspx/Public/Source Code/WCFSyncFramework.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;&lt;/iframe&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;The sync framework is a nice tool and toy that simplifies a lot of the hassles we had to go through in the past for offline data caching. Bundling it with WCF just gives it a fantastic edge. It should not be missed in your future projects.&lt;/p&gt;  </description><pubDate>Wed, 27 May 2009 17:12:40 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/zBi7P-8PdOw/cns!70A5B53D721071B7!847.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!847.entry#comment</comments><slash:comments>3</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!847')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-05-27T22:57:14.2300000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!847.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!579</guid><category>.NET</category><title>ADO.NET and DataAcess: What every developer should know?</title><description>&lt;p&gt;In the world of ever increasing ORMs, it seems that developers tend to forget that in order for you to utilise a technology to its full potential you need to understand how frameworks work internally. While I complain about how many people blog and talk about Data Access, I felt the need to clarify some of the annoyances I saw in various codebases dealing with ADO.NET over the past couple of years. &lt;/p&gt; &lt;p&gt;For the sake of this post I created a simple database as follows to help me better explain my points in some of the samples below. &lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mN7nhL9dyf9Bx1F5Ch5lJRNRtSumq7kmBUBbNB61ctZ1FNGlyHJZzbOQmHIQqVY7k9aMrKmIcSryQ0CDiBtnrwhsKGbLFutuLWOdbjtv8ulMFKHGDgZABgEEwb7fWcPohPRYPARdv2BAnPBOvw8hwfA/image[20].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mBCEYinKRmMfOA4uUY-_Ohu_bLLHa0lzDTBBAlATTHY4EwsSo-vVNMCgkn7Ncc5hVSWfrLHhJEuLTyJxSFXbb48sO4-sc5knOxj6pLD2BkDPuaMPyLY8V01EFvqQqxQCJ8UL__XcPgZW7eKMvF0UTPg/image_thumb[10] 587B015A.png" width="609" height="158" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;h3&gt;&lt;strong&gt;Encryption&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;When working with N-tier public applications you usually deploy your application on an App\Web server and a database server (most common scenario). While most of the time your database server is not exposed to the outside world of your application consumers, you assume that an SSL certificate will suffice on the web server to handle secure connections between the client and your application inside the browser or rich client. Recently I worked on a personal project where things were a bit different. My product was actually my SQL Server database which was exposed over the web.&lt;/p&gt; &lt;p&gt;I am not going to go into inner details of how we secured the server from hackers, attacks etc. I am more interested in how easy it is to encrypt information over the wire travelling to and from my db server. What was surprising is that most people I spoke to about this didn’t realise how easy it is to do that. So just like a web app I had a security certificate installed on the database server. Now that is all good until I realised the underestimation of the connection string power among devs. While this is a mild example but really it is easy, the main thing you have to do after making sure the certificate is properly configured is adding an &lt;strong&gt;&lt;em&gt;Enrypt=True&lt;/em&gt;&lt;/strong&gt; value pair to the connection string along with some supporting properties.&lt;/p&gt; &lt;p&gt;&amp;quot;DataSource=MyDbServer;Initial Catlogue=MySchool;Integrated Security=SSPI; Network Library=dbmssocn; Connect Timeout=10; TrustServerCertificate=True;&lt;strong&gt;&lt;em&gt;Encrypt=True&lt;/em&gt;&lt;/strong&gt;”&lt;/p&gt; &lt;p&gt;That is really it so please when passing credit card numbers to your stored procedures next time please do consider encrypting the traffic to your DB.&lt;/p&gt; &lt;h3&gt;&lt;strong&gt;Connection Pooling – When I don’t want it&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;Pooling is a great mechanism for enhancing the performance of our DB connections. Do note that pooling works over the connection Lifetime, hence a connection will be kept alive until its creation time is compared with the current time and then destroyed if the difference exceeds the lifetime. In specific scenarios though I would like to create a “Persistent Connection: One that stays alive until explicitly closed”. For that the I have to disable pooling. Again power to the connection string for this one. &lt;/p&gt; &lt;p&gt;&amp;quot;DataSource=MyDbServer;Initial Catlogue=MySchool;Integrated Security=SSPI; &lt;strong&gt;&lt;em&gt;Pooling=False&lt;/em&gt;&lt;/strong&gt;”&lt;/p&gt; &lt;p&gt;Another tip is when your are debugging data access code and have pooling turned on (that is the default behaviour) and you want to make sure that pooling is not affecting your scenario make sure you use the SqlConnection.ClearAllPools or SqlConnection.ClearPool methods.&lt;/p&gt; &lt;h3&gt;&lt;strong&gt;Load Balancing – Lending a hand to DBAs :)&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;Still working with connection strings again you may have a failover SQL cluster. While many of devs depend on DBAs to configure the environments properly, we all know how busy those guys are so why not give them a helping hand. One of the properties on connection strings again can do just that. &lt;/p&gt; &lt;p&gt;&amp;quot;DataSource=MyDbServer;Initial Catlogue=MySchool;Integrated Security=SSPI;                                            &lt;strong&gt;&lt;em&gt;Failover Partner=MyRescuerDbServer&lt;/em&gt;&lt;/strong&gt;”&lt;/p&gt; &lt;h3&gt;&lt;strong&gt;MARS – Multiple Active Result Sets&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;While not often done I had a scenario where I needed to open multiple SqlDataReaders on the same connection. Only problem is when you try to do this you get an exception saying “There is already a datareader associated with the command that must be closed”. But hey, my scenario dictates that I have that flexibility. Well at this time it feels that my post is about connection strings but hey why not.&lt;/p&gt; &lt;p&gt;&amp;quot;DataSource=MyDbServer;Initial Catlogue=MySchool;Integrated Security=SSPI;&lt;strong&gt;&lt;em&gt;                                                MultipleActiveResultSets=True&lt;/em&gt;&lt;/strong&gt;”&lt;/p&gt; &lt;p&gt;From this point onwards you’re free to open as many data readers (I believe) as you want on the same SQL connection.&lt;/p&gt; &lt;h3&gt;&lt;strong&gt;Command Behaviours&lt;/strong&gt; &lt;/h3&gt; &lt;p&gt;Now I am a big fan of defensive coding and policy injection. Command Behaviours for me are like policy injection in that I define my policies on how I want this command to behave in certain events. There is no one set of rules again on how all commands should behave or else we wouldn’t have been provided with this flexibility. So my tip here is do familiarise yourself with properties on the Command Behaviour class. &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.commandbehavior.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.data.commandbehavior.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mieJv2jN1DL3Zc10vSd8aEHHpVHzj4Oivy2Wj-JbB4RJSMvjUpzRJtQq0V8UEtdqDyQZEWRhfvlx-r2VCrOV_zakskBjFnVUSN6pGVGDk9CYYnu1x_UHw1EB_fuxEUGQsw7pMYMC9LgEPmKEWgEnLxQ/image[8] 75CD06CC.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1maeLc2TIJ4gGKA7FB-GFTjF79dJEPp8AensZMal_N8ywEZTFpBUXKzSSeHMbb1_ISIzC_ooV_9o14t7dkVyNwWnzwiakmRjEdCrx620KGz_mN8ZAcG1aEISgjkWbz_9BANSvUi85iqfxtqnOCpY1QTg/image_thumb[4] 3E368437.png" width="789" height="452" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;h3&gt;&lt;strong&gt;Command Builders &lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;Ever wondered how typed datasets generated the insert, update, and delete statements for you. Generation Templates? String Builders? Internal Logic? Black Voodoo? Again one of the most missed classes among junior developers are command builders. Now a command builder is not a code generation tool as such but by right it can be used as one. Examine the following code and it’s output. &lt;/p&gt; &lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;&lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Main()
{
    &lt;span style="color:#0000ff"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; connectionString = &lt;span style="color:#006080"&gt;&amp;quot;Data Source=localhost;Initial Catalog=School;Integrated Security=True&amp;quot;&lt;/span&gt;;
    var connection = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SqlConnection(connectionString);

    &lt;span style="color:#0000ff"&gt;using&lt;/span&gt; (connection)
    {
        connection.Open();

        SqlCommand command = connection.CreateCommand();
        command.CommandType = CommandType.Text;
        command.CommandText = &lt;span style="color:#006080"&gt;&amp;quot;SELECT * FROM dbo.School&amp;quot;&lt;/span&gt;;

        var adapter = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SqlDataAdapter(command);
        var commandBuilder = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SqlCommandBuilder(adapter);

        Console.WriteLine(commandBuilder.GetInsertCommand().CommandText + Environment.NewLine);
        Console.WriteLine(commandBuilder.GetUpdateCommand().CommandText + Environment.NewLine);
        Console.WriteLine(commandBuilder.GetDeleteCommand().CommandText + Environment.NewLine);

        Console.ReadKey();
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The output:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mvT_N556O6b-4kU9EtEhF8rR82BkgNa7zq63nGSKAUbv5HWQQ_QDY-UaLv81CoZMV0ua5JTRq13Bd9LE27LiCoZYLHhN_82fd0oOG-NyJ6pr9_uGjxHIDNoEinNBHIKAq0O3AXbIGzyHwXM-bE2GvAA/image[16].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mfVylAE1FRKBYyUyThU0FQPpr-oTfPj9Rn0GD0sxq-WevOzU9_jyR3n-KOhhy89JvvkBHVkID9BN3tqV20FKuQYrkHz8siehLkIUSldq5lFAq08dKlljbdkjG7zgzf85_Cu4aQdMN9XeT1lXNhpraMQ/image_thumb[8].png" width="635" height="114" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;As shown the command builder generated the select, insert, update and delete commands for me. While the select statement passed in has to be simple and usually dealing with one table, but still the generated code can be used in many of code generation tools I see today plus it’s used by the typed dataset designer.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Asynchronous Data Operations&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Now when working with transactions, developers always tend to keep the transactions on the lowest tier possible above their data repositories which is totally correct. On the other hand they tend to work with threading on the highest level away from their data repositories because asynchronous calls with WCF or the background worker are much easier. While the most common guideline for this scenario is IT DEPENDS I still think that when dealing with multiple threads doing various data operations, the most efficient way is to use your ADO.NET objects to handle those. Let’s take the following scenario:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I am reading some data from my school table.&lt;/li&gt;
&lt;li&gt;I want a file to be created after all the data is read.&lt;/li&gt;
&lt;li&gt;I don’t want the main\UI thread to be affected by the entire procedure and the whole thing is just a straight data dump with no business logic.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;To me this is a data operation that I don’t even need to handle outside my repository. Remember repositories sit in your infrastructure tier where you persist and read from databases, file, web services etc..&lt;/p&gt;
&lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;&lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Main()
{
    &lt;span style="color:#0000ff"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; connectionString = &lt;span style="color:#006080"&gt;&amp;quot;Data Source=XPSEXTREME;Initial Catalog=School;Integrated Security=True;Asynchronous Processing=True&amp;quot;&lt;/span&gt;;
    var connection = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SqlConnection(connectionString);

    connection.Open();

    SqlCommand command = connection.CreateCommand();
    command.CommandType = CommandType.Text;
    command.CommandText = &lt;span style="color:#006080"&gt;&amp;quot;SELECT * FROM dbo.School&amp;quot;&lt;/span&gt;;

    Console.WriteLine(&lt;span style="color:#006080"&gt;&amp;quot;Starting Read:&amp;quot;&lt;/span&gt;);
    command.BeginExecuteReader(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; AsyncCallback(WriteToFile), command);

    Console.ReadKey();
}

&lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; WriteToFile(IAsyncResult ar)
{
    var command = (SqlCommand) ar.AsyncState;
    SqlDataReader dataReader = command.EndExecuteReader(ar);
    command.Connection.Close();
    command.Connection.Dispose();

    &lt;span style="color:#008000"&gt;//Write reader content to file&lt;/span&gt;

    Console.WriteLine(&lt;span style="color:#006080"&gt;&amp;quot;Data is ready to be written to file.&amp;quot;&lt;/span&gt;);
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Do note that you have to apply the &lt;strong&gt;&lt;em&gt;Asynchronous Processing=True &lt;/em&gt;&lt;/strong&gt;property in the connection string for successful asynchronous calls. &lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;strong&gt;Batch Updates&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;One of the most annoying things in DataAdapters is that the default behaviour on executing multiple commands is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open Connection.&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;font size="3"&gt;Execute a single command.&lt;/font&gt;&lt;/h3&gt;&lt;/li&gt;
&lt;li&gt;Close Connection.&lt;/li&gt;
&lt;li&gt;Goto 1 :)&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;A very useful property that again many of us miss is the BatchUpdateSize property on the DataAdapter. To update records at once in the database with a single open connection you define BatchUpdateSize to 10 records at once. The property is set to 1 by default.&lt;/p&gt;
&lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;var adapter = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SqlDataAdapter(command) {UpdateBatchSize = 10};&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now that’s a neat solution but if you are using SQL 2008 why stop there. By creating the following stored procedure and utilising the new Table Value parameters I can do batch updates even more efficiently.&lt;/p&gt;
&lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;&lt;span style="color:#0000ff"&gt;CREATE&lt;/span&gt; TYPE dbo.StudentInput &lt;span style="color:#0000ff"&gt;AS&lt;/span&gt; &lt;span style="color:#0000ff"&gt;TABLE&lt;/span&gt;
    ( StudentId uniqueidentifier, Name nvarchar(100), SchoolId uniqueidentifier )
&lt;span style="color:#0000ff"&gt;GO&lt;/span&gt;

&lt;span style="color:#0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color:#0000ff"&gt;PROCEDURE&lt;/span&gt; UpdateStudents (@students dbo.StudentInput READONLY)
&lt;span style="color:#0000ff"&gt;AS&lt;/span&gt;
&lt;span style="color:#0000ff"&gt;BEGIN&lt;/span&gt;
    INSERT &lt;span style="color:#0000ff"&gt;INTO&lt;/span&gt; dbo.Student(StudentId, Name, SchoolId)
    &lt;span style="color:#0000ff"&gt;SELECT&lt;/span&gt; ns.StudentId, ns.Name, ns.SchoolId &lt;span style="color:#0000ff"&gt;FROM&lt;/span&gt; @students &lt;span style="color:#0000ff"&gt;AS&lt;/span&gt; ns;
&lt;span style="color:#0000ff"&gt;END&lt;/span&gt;

GO&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then I execute my command passing in a datatable parameter with multiple values.&lt;/p&gt;
&lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, 'Courier New', courier, monospace;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px"&gt;&lt;pre style="border-bottom-style:none;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:consolas, 'Courier New', courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px"&gt;&lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Main()
{
    &lt;span style="color:#0000ff"&gt;const&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; connectionString = &lt;span style="color:#006080"&gt;&amp;quot;Data Source=localhost;Initial Catalog=School;Integrated Security=True&amp;quot;&lt;/span&gt;;
    var connection = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SqlConnection(connectionString);

    var schoolGuid = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Guid(&lt;span style="color:#006080"&gt;&amp;quot;c7a92ea0-9fd5-42eb-9949-f16b3644cc6d&amp;quot;&lt;/span&gt;);

    var dataTable = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; DataTable();
    dataTable.Columns.Add(&lt;span style="color:#006080"&gt;&amp;quot;StudentId&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;typeof&lt;/span&gt; (Guid));
    dataTable.Columns.Add(&lt;span style="color:#006080"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;typeof&lt;/span&gt; (String));
    dataTable.Columns.Add(&lt;span style="color:#006080"&gt;&amp;quot;SchoolId&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff"&gt;typeof&lt;/span&gt; (Guid));

    dataTable.Rows.Add(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff"&gt;object&lt;/span&gt;[] {Guid.NewGuid(), &lt;span style="color:#006080"&gt;&amp;quot;Omar Besiso&amp;quot;&lt;/span&gt;, schoolGuid});
    dataTable.Rows.Add(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff"&gt;object&lt;/span&gt;[] {Guid.NewGuid(), &lt;span style="color:#006080"&gt;&amp;quot;Paul Stovell&amp;quot;&lt;/span&gt;, schoolGuid});
    dataTable.Rows.Add(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#0000ff"&gt;object&lt;/span&gt;[] {Guid.NewGuid(), &lt;span style="color:#006080"&gt;&amp;quot;Brenden Crowne&amp;quot;&lt;/span&gt;, schoolGuid});

    &lt;span style="color:#0000ff"&gt;using&lt;/span&gt; (connection)
    {
        connection.Open();

        SqlCommand command = connection.CreateCommand();
        command.CommandType = CommandType.StoredProcedure;
        command.CommandText = &lt;span style="color:#006080"&gt;&amp;quot;dbo.UpdateStudents&amp;quot;&lt;/span&gt;;

        var parameter = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; SqlParameter(&lt;span style="color:#006080"&gt;&amp;quot;@students&amp;quot;&lt;/span&gt;, SqlDbType.Structured) {Value = dataTable};
        command.Parameters.Add(parameter);

        command.ExecuteNonQuery();

        Console.ReadKey();
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;h3&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/h3&gt;
&lt;h3&gt;&lt;strong&gt;DataViews&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Ok by now the you must be bored so I will leave you with one last very simple clarification. A data view is a view built on a single datatable showing a subset or all of the tables columns. It’s not a view that you can use to join multiple datatables in the same dataset. This was a common joke at work recently when we were assigned to review some other mobs work so thought I’d share :)&lt;/p&gt;
&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Like anything make sure you know your frameworks internals and the simple\efficient things you can do. While in the world of ORMs most of this post doesn’t bother you much, trust me it will help when your manager comes screaming down your neck “Why is this not working? Why is it slow? etc.”. ADO.NET is a great framework so ride it till the wheels fall off :)&lt;/p&gt;  </description><pubDate>Sat, 23 May 2009 04:30:52 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/XMsh_TEQ5rw/cns!70A5B53D721071B7!579.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!579.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!579')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-05-23T04:30:52.0300000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!579.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!572</guid><category>General</category><title>Update</title><description>&lt;p&gt;It’s been a while yet again. It seems every time I get into assigning time to blog, I get drenched down by other stuff I have to take care of. But alas, 12:30am is the free time I get today. So what are the updates so far:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;I presented at CodeCamp with Paul Stovell on Aspect Oriented Programming which was pretty cool. &lt;/li&gt; &lt;li&gt;Been attending a lot of user groups lately.&lt;/li&gt; &lt;li&gt;While many already know this, I am not a Readify guy anymore. Been a tremendous journey with one of the best companies in the business. &lt;/li&gt; &lt;li&gt;I took up an Enterprise Architect job at Datacom, another great company. &lt;a href="http://www.datacom.com.au"&gt;www.datacom.com.au&lt;/a&gt; &lt;/li&gt; &lt;li&gt;Got certified in WPF. Woot! &lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mbOKmMIfF5PoUb4WzyXJ_gKyspao9_xHq1Xbw-g95T2zSqxLNo_e2MgauqQqTT7w2ORWeKo8RUbUCLKygmXnNtqkjBK_PgqEs3LTOpdNeTIQI_YifRVfBrnmw-pSJ3b5P9Et1N69OhWha-spnc9eBEw/MCTS(rgb)_1098[3].png" rel="WLPP"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px" title="MCTS(rgb)_1098" border="0" alt="MCTS(rgb)_1098" src="https://saakya.bay.livefilestore.com/y1m9yyClUtztJSxf_AU9_MX7wOwaiwpNihkPOAw_Jd1qgI5NV3YV0Ztn0Tn2qyqF1n9AqpdnBnQbIAPckIPnS9Hdr5B-eSkeG-bfEm7xaGrrKUWbsVWYLpkH4LeYHBgDw0Cc8Bnkh5fHEtz_80-SqhhCw/MCTS(rgb)_1098_thumb[1].png" width="382" height="65" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I am now looking forward to Remix and TechEd 2009. I also have a series of unfinished blogs to publish soon so stay tuned. Well that’s it from me for now. See you soon!&lt;/p&gt;  </description><pubDate>Mon, 11 May 2009 14:39:38 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/BDyW-ExnvtE/cns!70A5B53D721071B7!572.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!572.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!572')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-05-11T14:39:38.4700000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!572.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!535</guid><category>Visual Studio</category><title>Visual Studio: Multiple Settings Files</title><description>&lt;p&gt;I was explaining to a developer the other day the value in using Settings files to get &lt;strong&gt;Typed&lt;/strong&gt; configuration settings. He went and played around with it then came back and asked how would he merge multiple settings files from multiple assemblies together. He googled it for a while and found that it is a common problem with a lot of developers. &lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt; &lt;p&gt;If I am working in a solution with multiple projects, every time I add a setting file to a project, a new settings file and a new app.config are added to every project. When the solution is built and run, only the start-up project has the app.config files with the settings in it’s bin directory, hence all configuration from other projects is inaccessible. &lt;p&gt;&lt;strong&gt;The Answer&lt;/strong&gt; &lt;p&gt;While I know the first two things that would come to your mind are either doing a post-build script of some sort to merge the files, or you would search for a hidden option or process in visual studio that fixes the problem. The latter does not exist. The solution is quite simple though. Let’s say I have the following project. &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mPpDMHZ1k8ATwWmZPjIrfWM7oRrYtlTZd1isYwUpUG0prIaU2GLXhEdMl03PZkULDljPoXiULGHRCG2ITxOw_IBI9TObzj0mF-JVGzsA2720OzYvjm3zkTxSARJVYYNOn9ZVCvNXygs0/image[3] 259C0EF8.png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="268" alt="image" src="https://saakya.bay.livefilestore.com/y1mmpCpW9OdFnR70tasqTXVIa0A_ELf3u5QfQncCv509Plm-0sQJ4LsqU43fmTizlJMapziPDPMFeteNY-yX4Fm_drwNGXkhZOnkmb3qWYkCm_3NLQu1w-yrAjIHdjgWYQZHH_5nf4-bNw/image_thumb[1] 6CD11950.png" width="314" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;With these Settings defined in my Setting1.settings file. &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m1Vet0gG7nIYg9BRTugYp5Eyd0l9yEKuafwpiVhGaRWoh7VegRJHZ4iEX_57U9tyj15UA6tEvdC_VO37WauSQKG10K0RLE7JuruNxnXvQrFcnafEFvoyhHe1DvtAKV-5HNxwWpC-8_JY/image[4].png" rel="WLPP"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px" height="224" alt="image" src="https://saakya.bay.livefilestore.com/y1mAJAEYusEbKz-gCkseHhmR-tkeZRzr1Go6xgyqfPZs1tAjK6cTAs19jwSY7yZnxfVYzqbXBmZNGr6XNK2NOl26vyjRlvW25VQLHuE7KrWkSd_9JfaJUY-sk3bJS6BKq-OOXwTjfvSYQM/image_thumb[1] 038C5D24.png" width="543" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;The thing I need to do here is make Settings1.settings accessible to ClassLibrary1. The way to do this is by adding a link to the settings file as follows: &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mzCMgCD5I48FQSzxJFvHkPYJMlT0eHoIVTetX7EGuQKABxrpkMrCT1XEMrWjP4UiusCsCTbo9QF7eDLlggAXn53s2Ts94C75qsg4tmlPO1u0FaNTqMq5c4hTiC473hdShpp-cVYNirZI/image[8] 7DB4FB99.png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="365" alt="image" src="https://saakya.bay.livefilestore.com/y1mHn4LZkrXzeKluqUAg2aOVodfLVSkZGmcPNAM1Su-lCkPBlZJZHP3Aac_n2E49uvnWFvkGMSQxgIOnOvMc4nRJnQRvJ480MeqCGcb9FweB134XF0p98ULnzwMspm7IH0gc8KOmnjlg50/image_thumb[4] 48F453C4.png" width="354" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mmlkBx7i1GFR5xzLea7_UxCaa5renZH8Yd6t9nKXniVJhKm5qxy1A5btT9QwAe7eYddM4PaDNxj6LaiBjp9EmVd0Sa_T-YGrJ-nxl52bOY7cOWsfp98PlCVe0rwD1HHBrxaW9urXJ0RU/image[13] 1935E99E.png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="416" alt="image" src="https://saakya.bay.livefilestore.com/y1mJpsHhfwumKWYsbXXlOIxAYyiO-gZL-E5osKqWKDCSyhvJkbM3wJYW6k0REEU9OaUUXgim0hk0uy5H3H8ljoki3gMwmFDeWXRZWqFahm6eHsfEs3X7vB3FR6YGnnHlsJqcv3kumoaAQg/image_thumb[7] 7C2C792E.png" width="559" border="0" /&gt;&lt;/a&gt;  &lt;p&gt; &lt;p&gt;Now I end up with a link to the settings file in my non-startup class library project. &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mUyZ4SEPe9BuZPKMvCR56dd9na3AvG3IZMxXeNXMQf-gCNHbFyxI2-TcKZI-Rxa4h3nmS5HN11I12YlviXHLhrOspEtaTFd5CnacS2I7qjitfGo50oQ4ybVb-2KOodyAno9KdAWHHZec/image[17] 29211A63.png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="283" alt="image" src="https://saakya.bay.livefilestore.com/y1mw5qGWKUvnagh_ZTaOXFBqjvlwfRWi5mCgWHQxZs_EaO_bFET11EOaFjY0wBL_bSt4WkBzd0pdfLvDOm98YsXVSUSuwZOjy-4u6gVyrcy_nGfmpslRng67JbR88Niy8Nw7hUnWCMXueI/image_thumb[9] 3A712FA1.png" width="304" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;Now I can go into my test class and do something as follows: &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; MultipleSettingsTest.Properties;

&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; ClassLibrary1
{
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; Test
    {
        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; DumpConfig()
        {
            Console.WriteLine(Settings1.Default.MySecondaryAppConfig);
        }
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;My testing code looks like this:
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; MultipleSettingsTest.Properties;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; ClassLibrary1;

&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; MultipleSettingsTest
{
    &lt;span style="color:#0000ff"&gt;internal&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; Program
    {
        &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; Main(&lt;span style="color:#0000ff"&gt;string&lt;/span&gt;[] args)
        {
            Console.WriteLine(Settings1.Default.MyStartupAppConfig);
            Test.DumpConfig();
            Console.ReadKey();
        }
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and the output is
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mbo9ZsKF2f5dytquM89gSfoom80EVHIE03xro3Jjtlip0fywcuoBn-4--_cnmPUeBJ8lNuJTEB9PSTdpipfioESPQ62Me0mmIguqOjmAa0gLaAzrjkivakmTEPPrDcKxsvSNyMOW38gI/image[21] 77720EDB.png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="133" alt="image" src="https://saakya.bay.livefilestore.com/y1mI6HDLh5lUqn8u-1Hpcek1r6IwSgQDjvu2StAH5pM_9_yEl5I7HVXYyX2H8ojBAolvfHS1bxqFpmSQ0ovRDEyWJvOnJmTVgx9tsQe8842KXnQINoPVPZJ9cTyB5YGHjRpuN_kb9Nlq7c/image_thumb[11] 65E16269.png" width="353" border="0" /&gt;&lt;/a&gt; 
&lt;p&gt;&lt;strong&gt;Two Catches you have to pay attention to:&lt;/strong&gt;
&lt;ol&gt;
&lt;li&gt;Every time you edit the file, the custom generator tool will always change the namespace to the that of the project the settings file is opened from. &lt;strong&gt;Hence you should never try opening or saving the settings file except from the start-up project (do not open the linked version, only the master). All viewing and editing of the file has to be done from the start-up project.&lt;/strong&gt; 
&lt;li&gt;The namespace of the start-up project will end up in the using statement in the class accessing the settings file as seen in the ‘Test’ class above. &lt;strong&gt;This is not circular referencing.&lt;/strong&gt; It’s merely a namespace that becomes automatically available for the non-start-up assembly due to the Settings.Designer.cs class being linked to. While some people might not like that, it’s still the quickest the solution to the problem.&lt;/ol&gt;
&lt;p&gt;Now you can enjoy typed configuration settings across your solution.  &lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</description><pubDate>Wed, 18 Mar 2009 13:44:00 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/y0Lilfj_TRY/cns!70A5B53D721071B7!535.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!535.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!535')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-03-18T13:52:46.1170000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!535.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!524</guid><category>Security</category><title>Application Security in .NET 101</title><description>&lt;p&gt;While I am a big fan of applying security as an aspect in my applications, it is inevitable for developers to understand the security means and measures in .NET.  &lt;p&gt;&lt;strong&gt;CODE ACCESS SECURITY&lt;/strong&gt; &lt;p&gt;Code access security facilitate usage authorization to different resources like the registry, file system, printers etc. CAS also allows a developer to control what actions an application can take in a given context. Assemblies restricted by Code Access Security are referred to as &lt;em&gt;partially trusted&lt;/em&gt;. Code Access Security applies permissions (rights) to applications and not people, so there is no usage of usernames and passwords. &lt;p&gt;Code Access Security uses &lt;em&gt;Evidence&lt;/em&gt; to identify assembly’s rights. Evidence is a bunch of information used to identify the code groups a secured assembly belongs to. There are two types of Evidence. Assembly Evidence, which is a developer coded evidence, and Host Evidence, which specifies where the assembly was downloaded from. Types of Evidence include but are not limited to: Strong Name, URL and zone. &lt;p&gt;&lt;strong&gt;PERMISSIONS&lt;/strong&gt; &lt;p&gt;A Permission is an entry in Code Access Control. In the System.Security.Permissions namespace there are out of the box permissions that are commonly used in day to day development. The permissions are outlined at &lt;a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.security.permissions.aspx&lt;/a&gt;. A group of permissions is called a permission set. A permission set applies to certain contexts. As you can see in the image below, the default permission sets in the .NET framework are more like zones, such as the internet permission set. &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mqgvzzbDBro6ER_FQl0PNiJo1J84m-iRCUjewFqQ-KfPBwJUX-QCpvUaa_mMNPivyank0MwtIieKUbeOEjx1ElGbi1FkAmz37F9UnIfDZn7FMvJg4wAhjUehaQY0gdcxIug6V73aMkF8/image5.png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="189" alt="image" src="https://saakya.bay.livefilestore.com/y1mtbvraP4Ig7nJ9qxALYexaqcdiWm_VI8P4CG7qfVwGF-GZE665-o9S3boifgY3_I4hTf_Rua_ornS7yLskBzHUi5jHJyAT7cx0Iic_CGAHzDKj0VG9rRJP7uq-eUNDrWVMJPgzthSORI/image_thumb3.png" width="721" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;In Visual Studio, one of the handy tools I use usually to identify the permissions required for my application to run is the “Calculate Permissions” button found on the security tab under project properties.  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m5gA4R1AlP1Cvbui-AR_niKaWcRuM_z_vVjo2F4-41tEbWrjQZKyHMs2lGqYupZpclPpuUskVYN6PBqOOevs4XhNEh2dbZ4O9Ig5Y30MivBJSOckmpRMBf0Ll5AFDvCaxVDEDBFHu93U/image10.png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="275" alt="image" src="https://saakya.bay.livefilestore.com/y1mXpx5hBmUyYgW_ovBY4RRqbIM05Ys7Pb2T9Xh5tGtM0Uusl7YPyuOBYE_AvKbw-BpNejH9b9bs3ARi43ROg-po1xEws8_VSk7Zns9hOU4rXpTIBZTzT2uG8RbNNNWCgMvZjdCHZ1n6pw/image_thumb6.png" width="429" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;One you calculate permissions, your assembly will build and then the permissions required to run that assembly will be enabled. These will be defined in an app.manifest file created under your projects properties folder. &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mIkTrX7dcj4ooIPOrJgYUvTzGisdk_-kT6Ln74L0RoIhrLFLzE9HDDyyWR0j1usPmcYcEVwbeuN7RHFevIRTR-7ihTdZn8OIqqjc9nNa76EjwDr-JamqGfzg0J1OTy4sghYNa5gpvYmY/image14.png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="106" alt="image" src="https://saakya.bay.livefilestore.com/y1mBgOX55qJf3Vu5ta8MVYhDsoR04X63XUvP4vWaY1WvJ1CLdmsZFy7DcrLI-cGBtlkdxjvKs0QpVbpUrt5yRAriGIYnyd-awQ3UIAlyx3L4pO-SDh9EYg_NlUVFrrs1RDYetKdyq3OnTA/image_thumb8.png" width="250" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;The manifest file will include the following segment.  &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;applicationRequestMinimum&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;defaultAssemblyRequest&lt;/span&gt; &lt;span style="color:#ff0000"&gt;permissionSetReference&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;Custom&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;PermissionSet&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;System.Security.PermissionSet&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;ID&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;Custom&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;SameSite&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;site&amp;quot;&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;IPermission&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Unrestricted&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;IPermission&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Flags&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;UnmanagedCode, Execution, ControlEvidence&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;IPermission&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;System.Security.Permissions.UIPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;version&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Window&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;SafeSubWindows&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000"&gt;Clipboard&lt;/span&gt;&lt;span style="color:#0000ff"&gt;=&amp;quot;OwnClipboard&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;PermissionSet&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;applicationRequestMinimum&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
&lt;p&gt;&lt;strong&gt;CODE GROUPS&lt;/strong&gt;
&lt;p&gt;Code groups associate permission sets with assemblies. They are more like zones. For example, if an application runs in the in internet mode then it belongs to the Internet code group. If you go under administrative tools and spawn the .NET configuration editor as follows you will see the different code groups (zones) defined by default.
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mcigZsj7NqLstL-Y_xHuN-q-4zbiGL7uwqn_S8wZhJ0rOgrDBCw-aHEj5Rl64yDNkjNbhW4mCQBP8kZPMRJ4LQkl-TNyb88FqYcc6NA5eftn4PIWAWqKWd83ekj9Qk2h581EQVPHN61A/image[7].png" rel="WLPP"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px" height="202" alt="image" src="https://saakya.bay.livefilestore.com/y1mH7aXZ1Y3LE_0zDf4R_otYedIQmbJXNMYqYov_gw5L_kvLKWLC4rkaM9E76BnjF8kXRkYThQvjhFKXRWd8TShTrucOC6YRJEem2q1M-tlh3JawSFZAlR_sSatDYDls4DGQQybEsw9mUc/image_thumb[2] 7C1275BE.png" width="413" border="0" /&gt;&lt;/a&gt; 
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mnEbWyuSlhhsxKpWcjPjNgZVpnLKX7HkXjgjAo1-rPimxdevLiUwZNUbcfT1rthofkt7ENlRaMn2gPM2JRk_gzHxgR6C0o_tqzKrCFgs0iiel4HJMQExAFr4ZZVHb9LeYcfMUTlgmKqw/image[11].png" rel="WLPP"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px" height="285" alt="image" src="https://saakya.bay.livefilestore.com/y1mqz6zkgzM6xAJ-CjwfAn_UQ0DJBKUF1PyPas0d_JQpf6kw2LU1P00rNt_LHBwjSUVZ4KKaeJl1w2n_HguiZxV9uQz327AemaJHDH5CT48-vbFSE-_rl_240WOJQ9MEumjTcVsqutznZs/image_thumb[4] 38F3095F.png" width="292" border="0" /&gt;&lt;/a&gt; 
&lt;p&gt;&lt;strong&gt;SECURITY POLICIES&lt;/strong&gt;
&lt;p&gt;As if we didn’t have enough groupings already we are hit by one more, the security policy. A security policy groups code groups and permission sets. A security policy facilitates custom security but having the ability to contain assemblies that define other policies. Think of security policies as a security measure you would apply to an enterprise and then a corporate group and then departments. When multiple security policies are detected, the run-time will apply the strictest combination of permissions sets to the assembly. To visualise the security layers explained:
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mA7d3dRuu5pe63wTVHWO4F4Nfkw0Hw7ai_mcxaFkWevh2BDnkcJZc4Wpbku9dRBVLE9IlQlP_j7mBAAM7zpbrC3f9fKQ3_RmGrFiE-wjYznVGcuXGZ9reZ8o9xr3P1v1q_OtCSTwEJIw/image[15].png" rel="WLPP"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px" height="266" alt="image" src="https://saakya.bay.livefilestore.com/y1mcHxNxFxt6l9Euq9h6uYiH9e1GOuhUDGQ_k07j91sEFvmNhIiSZRvkV3ghMEacMCs6ZHqJRDkBQ8ODKCvAnlkStgP5fJcwe-ysgEODeBDB_xEc3jsSF13urexBwlRs9iW89Ls3ZeVKkU/image_thumb[6].png" width="437" border="0" /&gt;&lt;/a&gt; 
&lt;p&gt;Using the .NET configuration tool above will allow you to set the different layers of security for your assembly and\or application.
&lt;p&gt;&lt;strong&gt;CODE ACCESS SECURITY AND THE OS&lt;/strong&gt;
&lt;p&gt;Remember that Code Access Security can be defined independent of the OS, but it still runs on top of it. Confusing? Well if a user is given only read access to a file by the OS and a Write access by Code Access Security, the user will be able to read the file only and the assembly will be denied the writing privileges for the user’s context it runs under.
&lt;p&gt;&lt;strong&gt;SHOW ME CODE&lt;/strong&gt;
&lt;p&gt;So now we need to declaratively specify security permissions in our assemblies. We do that to ensure the runtime grants the appropriate permissions to our assembly when it runs. There are few types of permission declarations we need to be aware of. The following list from MSDN explains those types and more information can be found here &lt;a href="http://msdn.microsoft.com/en-us/library/system.security.permissions.securityaction.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.security.permissions.securityaction.aspx&lt;/a&gt;
&lt;table cellpadding="0" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;Demand&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;All callers higher in the call stack are required to have been granted the permission specified by the current permission object (see &lt;a href="http://msdn.microsoft.com/en-us/library/60zfc754.aspx"&gt;Security Demands&lt;/a&gt;). 
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;Assert&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;The calling code can access the resource identified by the current permission object, even if callers higher in the stack have not been granted permission to access the resource (see &lt;a href="http://msdn.microsoft.com/en-us/library/91wteedy.aspx"&gt;Using the Assert Method&lt;/a&gt;). 
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;Deny&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;The ability to access the resource specified by the current permission object is denied to callers, even if they have been granted permission to access it (see &lt;a href="http://msdn.microsoft.com/en-us/library/hk3b9142.aspx"&gt;Using the Deny Method&lt;/a&gt;). 
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;PermitOnly&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;Only the resources specified by this permission object can be accessed, even if the code has been granted permission to access other resources (see &lt;a href="http://msdn.microsoft.com/en-us/library/y6abcbh4.aspx"&gt;Using the PermitOnly Method&lt;/a&gt;). 
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;LinkDemand&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;The immediate caller is required to have been granted the specified permission. 
&lt;p&gt;For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hzsc022c.aspx"&gt;Link Demands&lt;/a&gt;. For more information about declarative security and link demands, see &lt;a href="http://msdn.microsoft.com/en-us/library/cz02ke7h.aspx"&gt;Declarative Security Used with Class and Member Scope&lt;/a&gt;. 
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;InheritanceDemand&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;The derived class inheriting the class or overriding a method is required to have been granted the specified permission. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/x4yx82e6.aspx"&gt;Inheritance Demands&lt;/a&gt;. 
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;RequestMinimum&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;The request for the minimum permissions required for code to run. This action can only be used within the scope of the assembly. 
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;RequestOptional&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;The request for additional permissions that are optional (not required to run). This request implicitly refuses all other permissions not specifically requested. This action can only be used within the scope of the assembly. 
&lt;tr&gt;
&lt;td valign="top"&gt;
&lt;p&gt;&lt;b&gt;RequestRefuse&lt;/b&gt;
&lt;td valign="top"&gt;
&lt;p&gt;The request that permissions that might be misused will not be granted to the calling code. This action can only be used within the scope of the assembly. &lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/td&gt;&lt;/td&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt; 
&lt;p&gt;Here’s an example of demanding permission to access a specific file and registry. I usually place this code in assemblyinfo.cs. 
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;[assembly: FileIOPermission(SecurityAction.RequestMinimum, Read=&lt;span style="color:#006080"&gt;&amp;quot;C:\test.txt&amp;quot;&lt;/span&gt;)]
[assembly: RegistryPermission(SecurityAction.RequestMinimum, Read=&lt;span style="color:#006080"&gt;@&amp;quot;HKEY_LOCAL_MACHINE\Software&amp;quot;&lt;/span&gt;)]&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Hope this was a good intro to application security in .NET.  &lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</description><pubDate>Mon, 16 Mar 2009 00:25:49 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/T2Pki-aWxA4/cns!70A5B53D721071B7!524.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!524.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!524')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-03-16T00:25:49.5700000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!524.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!510</guid><category>General</category><title>Parso’s World’s Greatest Shave</title><description>&lt;p&gt;On Friday I had the pleasure of catching up with my very good friend Andrew Parsons at Microsoft for lunch. Just as it happens, it was the World’s Greatest Shave event and Parso had volunteered to get a shave. I even paid 20 bucks to shave a portion of Andrew’s hair myself. Here’s for Parso, &lt;a href="http://tinyurl/VirtualShave"&gt;http://tinyurl/VirtualShave&lt;/a&gt; . &lt;div style="padding-right:0px;display:inline;padding-left:0px;float:none;padding-bottom:0px;margin:0px;padding-top:0px"&gt;&lt;a style="border:0px" href="http://cid-70a5b53d721071b7.skydrive.live.com/redir.aspx?page=browse&amp;amp;resid=70A5B53D721071B7!499&amp;amp;ct=photos"&gt;&lt;img style="border:0px" alt="View Parso's World Greatest Shave" src="https://saakya.bay.livefilestore.com/y1mDqjj2fJ_jAe_8ZJGzpc774YqYFgw8swt1JUKreUwS2nwM9SK02hivbu1KvfTKAexsCZtlDOWNzQeH6OEOH2BVgPtpRtmn1Isrvcv410Vv0B2PtarNwLjw0QfN_i9Fk-O9x-Mdq9Lphc/InlineRepresentation2c589777-1cd8-49da-a907-a4f5f97da757[3].jpg" /&gt;&lt;/a&gt;&lt;div style="width:744px;text-align:right"&gt;&lt;a href="http://cid-70a5b53d721071b7.skydrive.live.com/redir.aspx?page=browse&amp;amp;resid=70A5B53D721071B7!499&amp;amp;ct=photos"&gt;View Full Album&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;  </description><pubDate>Sun, 15 Mar 2009 06:57:10 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/xwOCfun4uGk/cns!70A5B53D721071B7!510.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!510.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!510')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-03-15T06:57:10.6470000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!510.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!494</guid><category>General</category><title>Sorry for being a Microsoft Guy</title><description>&lt;p&gt;Lately I have been having a lot of discussions with fellow IT industry veterans about how I am very biased towards everything that’s Microsoft. I felt the need to explain why I am such a big Microsoft fan.  &lt;p&gt;So I wasn’t born with a picture of Bill Gates in one palm and one of Ballmer in the other. While still young I have done my time with COBOL, FORTRAN, PASCAL, JAVA and then .NET. I have tried other things like Linux and MACs along the way and it was out of pure logical judgement on what’s best for me that I associated myself with Microsoft. In the day we live in today there is no better integrated suite of software for both the personal and professional lives like the Microsoft ones. At least that’s my opinion. &lt;p&gt;&lt;strong&gt;PERSONAL LIFE&lt;/strong&gt; &lt;p&gt;So I flip my laptop open everyday to Windows. I double click outlook to check my email. I start messenger to keep in touch with friends. I use IE to surf. Sometimes I fire up Live Writer to blog (like this very moment). I might have media player in the background with earphones and listening to my playlists.  &lt;p&gt;&lt;strong&gt;BUSINESS DAY&lt;/strong&gt; &lt;p&gt;I get to work and I fire up Visual Studio and SQL Management Studio. I then might fire up expression blend to look at the latest WPF screens produced by the design team for my current project. Still using Outlook for my personal emails and Project to see how we’re tracking and TFS to manage my team. Then it’s office for word and excel files sent to me by other colleagues. I then might use Office Communicator to stay in touch with my team. I then get my phone calls and emails while I am on the run on my Windows Mobile phone. SharePoint, BizTalk, SQL, ASP.NET, you get the picture. &lt;p&gt;&lt;strong&gt;ARCHITECTURE&lt;/strong&gt; &lt;p&gt;My title at work is ‘Architect’. Mildly, that means putting designs for software needed to make clients happy and productive. Now here is a bald statement: ‘There are no &lt;strong&gt;technology independent&lt;/strong&gt; architectures‘. So if you are an architect who comes to me claiming that you architect for the .NET &amp;amp; Java world, all that tells me is that you spend most of your time coming up with documents on very high-level &lt;strong&gt;descriptions&lt;/strong&gt; of a solution and not an actual &lt;strong&gt;design&lt;/strong&gt;. So for that I am a Microsoft world architect and that’s how I make my living and I don’t claim that I will produce the same quality designs if I try architecting a Java solution. &lt;p&gt;I don’t only use Microsoft software but by God I do so most of the time because they managed to provide me with the integrated life that, as an IT professional, I do need. Like him or not, Bill Gates has given us all a way of life. Wether you like him or not, live that life or not, it is the truth. With all the things you disagree on about Microsoft (I don’t agree with every thing that they do), there is no other company that provides me with that integrated life ‘with the same ease’ and for that I am, and sorry if it upsets you, a Microsoft Guy.  </description><pubDate>Sun, 01 Mar 2009 14:31:59 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/xdm7T2zohFE/cns!70A5B53D721071B7!494.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!494.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!494')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-03-01T14:31:59.3900000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!494.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!493</guid><category>Windows</category><title>WINDOWS 7</title><description>&lt;p&gt;So finally I am on Windows 7 as of 2 days ago. Pretty cool stuff and I won’t make this another what’s new post, but in general when I was going for XP to Vista I wanted a revolution, I got it on the features and dev side but not on the UI side. With Windows 7 I think the term ‘usability’ was redefined to perfection. As they say a picture is worth a 1000 words so here are few screen shots. &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mWKtCzMQwM0mAADl4zB-J98OtcLIyU6a-pnPmgAIJESfViq2u1m1PRhyKFBnz93W8AtRItUoMu2T3gKmQNAYVHJ9VZUIsWL-Fmff_kneAObm_lwuTU6k3-ULNi1IX2zUL5m6OzgD1OoA/image[3] 49300509.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mBsQD0YI4JP2QHiR5gKhCKMQjmNpfKTUohE0NAaYzDSxNcECO_hxCaf8W_xcPu-avgoEOwLQfNUfnDJ6CJ2wYe0DgXapq7sikSPZyYSgjgKpuG8bORL6n5zBsZcDp70ewHQPX_Xfo-F4/image_thumb[1].png" width="792" height="496" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m1isnOQ_98knciUoR1sk6sbfU5jnVZIMnc7CpsSmhBTtIoXIHvs2JDwPPRv17j5Vb9s6hUc4yMfPcoSKeBYNHezWObzTEyB1si0h1RyA4QtYraXoxrgxTAfcUO_gh6uomma5RrIOz6as/image[8].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mekeGBzjk1sDy4LjpmzgjJawBz-xcG8SeDcDjpBreiHElcDotC5SagzMVvFgkvpnm40CAGjbOe-80-saMyOB76ClnAl_runLBBoI1TKMmOuuj9VuSIUzX8XR4gvkXKypaJbr7nref1WI/image_thumb[4].png" width="790" height="496" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m9GeIdLq0HB9LxpiqIK1f2nBSaiiZQuoFFd8-_icAphrc_zJIf5X7yuWkRAtotBQEDkMRaWmu0T_H7nU6EzMQzqnyxhh-jWg4iOYCWC0W34tozNR_ymkZKJinC0TJdXxxVm25atqd9C0/image[25] 0135E2BD.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mxaClHU1uNjItnp9ktvMNGZqaQwmIFvXZraVKygbX2PO1at4SMNgs6hGK3h97DW0Nvoh0LnZ8vZeG9UZubdoAkR4SLpUOD8K52Lm-IK0He93WUyuYYhse_-mdy-WPiZSM9p5pMZm0aeI/image_thumb[13].png" width="786" height="493" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mj4u9aJiao1qpf1rAAOSR9wnJISKUfwIjGc8cxclP6_OqeVlGkXX8cD-KQ5W4qIfIch-hDYwE8SgLHLJe4tLy7ID7tcW3HlojqPdaFsjJhH5w5sKHENAO--54eisbyvQrmGHzI2pj8wM/image[13].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mVWrOKtWF5N68Q2gefriPFMLBLvMQBxU3cPXJH2OHm9hyV2Y2ux0SRD_3kGuKtn43cVLsC1ojIBAI1arLg7SF7z-Mg1GYRsbqnu_Hmmwt0BCpFOehqjPiCSWbOssMy8M9zOWwJoYgAsM/image_thumb[7] 76DC965E.png" width="468" height="584" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1m-GGchUGyJnFkCy4NsXv6M8UI85vHJlcNAyITbjskPlo3t63bgx8VZvIfN70X4msr3VYH0-tavPkKzoHkvJAoLGB5ByYNePsYAZ_KTHUiGRPgwL0VC66JBvbSDqLHm2Wi7HIcn2Bbgo4/image[17].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mFTrIIR0duV5iQclRhufFVwoCxRSCyPSB5EThszEZqa_0AbiEV0Q0DmW_LyJCXIDz-G_YpzelorDSrXUJNweQoCnApKC_fpCZJh0m954sFflSC-kTgC3mqN0bP7FBx0if1sW_6C8jcvI/image_thumb[9].png" width="698" height="198" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mPYQlo4fewd9L9RBNyqAhI1X0WBoPmSdvSDJmCeDeAmnQrHmC6V3leNs__dYj0P-Z79vf-ekQKQPQA0T_-9c80LjmZBF5cq9pHmEYh2I0LZdCCoAUU18z4iZKvaptT54qCeX3vbxnc4M/image[21].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mxbAS8gL30f6olHeR2ukg2J0b9vlvEaqIGS_Vnpm1AcIrMyndUyAkSNpteHjRX4FDDu10m_NG14-O53eN5LdFEfDs9_w4PvB83JKUJ_iOSnM0I02Yt3DO1Rb6yiS0zX8tUG1K5BuTeKI/image_thumb[11].png" width="692" height="239" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mkohZMz5Zu7VoEATL36q03E52qOZCCUPge1zsAIs4H3CRt6Oqgkja7UcK8jKeoED-DJWZKyfufox8zKdv5ma3dOw21k7OVVAVROHbiWO1Ehecnsn1X5wUuiV98AVW6cC_vMtINegXiQg/image[25] 0135E2BD.png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mb0qqnUB8l3FcpNWxpGOLlX0MTmTwpIEsW_Pjp0Toua5vqbPeQDJ1R6haMArmhKB732vRqftFKQ6kf1tvInOLBJeY8a0wbfUyMtBFJg1DYeW3aNbxiXDCD3BIUoKWb85TJYEQh_lBf7g/image_thumb[13].png" width="244" height="154" /&gt;&lt;/a&gt;  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mDxlbsRmaIOo9zICDTtFVWoIh6SqpsGe1j37wjprIqAoPxeTVt5ZPCpjLDr6QpcPsDqk6pXYj3LQLJp1L2HfNGRU4Zf-AO4RFyDjzwOv8jniWQU-3ubbb7WWb7nqBT20Ie1hqWKHyKGw/image[29].png" rel="WLPP"&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="https://saakya.bay.livefilestore.com/y1mNSTIZtcEOmjhIbPjipeSK8P9YW5oM-u3bWcbTo9EHmP2WyLvi3qkT8M1D-oWnzI5cWUTp-nn7Y2BniVeeQqGjoBiYFijhNPtFsctford-zK8l5LjRcs3mPoXRnl6Cfa9f4oqUkz-rNI/image_thumb[15].png" width="253" height="614" /&gt;&lt;/a&gt;  &lt;p&gt;Ok well there’s a lot of more eye candy but what’s more is stability and amazing performance and I can’t believe this is only in beta. So it has already become my main operating system. Had to give up on apps like Nero 8 and Textpad but hey didn’t use them much anyway. I am also running Norton 2.0 360 beta with a funky registry cleaner. See image above for entire list of applications.  In general the entire experience has been great and I will post any more findings that could be interesting .  &lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</description><pubDate>Sun, 01 Mar 2009 13:25:11 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/8TH1igJS29s/cns!70A5B53D721071B7!493.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!493.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!493')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-03-01T13:26:41.4700000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!493.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!475</guid><category>Developers</category><title>Couple of Cool Tools</title><description>&lt;ol&gt; &lt;li&gt;When working with unmanaged code it is always a hassle trying to figure out the standards the creator wanted you to use. In general in dealing with COM objects, you need all the help you can get. The &lt;span&gt;&lt;a href="http://www.codeplex.com/clrinterop/Release/ProjectReleases.aspx?ReleaseId=14120" target="_blank"&gt;PInvoke Interop Assistant&lt;/a&gt;&lt;/span&gt; is a great tool you can use. From the project’s site:&lt;/ol&gt; &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;In marshalling, there are a bunch of attributes and rules. Understanding all those attributes and rules seem a bit daunting. In order to make developing work more efficient and easier on those attributes and the rules, P/Invoke Interop Assistant comes out. It is a toolkit that helps developers to efficiently convert from C to managed P/Invoke signatures or verse visa. This is conceptually similar to TlbImp for COM Interop which generates managed proxy entry points based on some formal description of the unmanaged side but it works for P/Invoke.&lt;/em&gt; &lt;p&gt;&lt;em&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="483" alt="P/Invoke Interop Assistant" src="http://blogs.msdn.com/photos/bclteam/images/8644297/original.aspx" width="648" /&gt;&lt;/em&gt;&lt;/p&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;   2. Sometimes you just need a quick query issues against a DB. I found &lt;a href="http://www.albahari.com/queryexpress.aspx" target="_blank"&gt;Query Express&lt;/a&gt; to be the perfect tool for that. From the site again: &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;Query Express is a simple Query Analyzer look-alike, but being &lt;b&gt;small and free&lt;/b&gt; it can be run where the SQL Server client tools are not installed or licensed. This makes it especially useful as a query tool for MSDE and SQL Express. It also connects to Oracle and other OLE-DB compliant databases. &lt;/em&gt; &lt;p&gt;&lt;em&gt;Query Express requires no installation and is packaged as a single 100KB executable. This is more than 300 times smaller than SQL Server Management Studio!&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;img style="display:block;float:none;margin-left:auto;margin-right:auto" height="510" alt="Query Express Screenshot" src="http://www.albahari.com/images/qe.gif" width="662" /&gt;  &lt;/p&gt;</description><pubDate>Sat, 28 Feb 2009 00:59:39 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/p47ZF8Gd5s8/cns!70A5B53D721071B7!475.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!475.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!475')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-02-28T00:59:46.9430000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!475.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!474</guid><category>General</category><title>Update</title><description>&lt;p&gt;Pretty eventful week. My dad and brother arrived in Sydney. Very cool to have a busy home after such a quite time with travelling for work and presentations. I presented a lightning talk on PostSharp and Enterprise Library in the ALT.NET user group. Looking forward to starting the internal user groups at work next week. Should be fun :)  </description><pubDate>Sat, 28 Feb 2009 00:46:58 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/_8RCCP98KTM/cns!70A5B53D721071B7!474.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!474.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!474')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-02-28T00:46:58.0130000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!474.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!473</guid><category>Architecture</category><title>It’s a plane. It’s a bird. No it’s LightSpeed</title><description>&lt;h3&gt; &lt;/h3&gt; &lt;p&gt;Would you imagine a super hero called LightSpeed. Oh hang on, Stan Lee did create one of those.  &lt;p&gt;&lt;img src="http://img504.imageshack.us/img504/3063/lightspeed2006dvdnm5tl8.jpg" /&gt;  &lt;p&gt;Only in my world the hero software was created by &lt;a href="http://www.mindscape.co.nz/" target="_blank"&gt;Mindscape&lt;/a&gt; and the trademark logo on the cape is  &lt;p&gt;&lt;a href="http://www.mindscape.co.nz/products/LightSpeed/default.aspx" target="_blank"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="91" alt="image" src="https://saakya.bay.livefilestore.com/y1mKGrd02GGgAF5Soci2L9Mr_rquJ-wziWQYBzooAiQO_0Cw7IW-zZkFDWzPOribIvHOWVG0vGyUP9J9VCReunDBVSOKhzL4tBokds4GjegOl9Hz4zkS2t-_z6EsrIVyf_ELZ0PJILwCaw/image[3].png" width="244" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;Ok, jokes out. For years now I have been promoting against the usage of ORM tools and code generation tools. Even Microsoft's LINQ-to-SQL and Entity Framework didn’t cut it for me. As a ‘sometimes’ purist guy I believe any domain driven design should accomplish PI (persistence ignorance). Unfortunately LINQ-to-SQL and the entity framework do not have 100% PI not to mention the dependency on the Data Context objects and not to be over picky but hey if I want my domain (Business objects) and Infrastructure (Repositories or data layer) to exist in different assemblies and use dependency injection between the assemblies then by God it is my right.  &lt;p&gt;The other thing is I was always looking for a tool to visualise my domain. While some people, including myself, often use class diagrams what we really needed is a tool that visualised a lot of the domain driven design concepts, such as aggregates, value objects, associations etc. Not only that, but how good would it be to be able to set simple properties to inject or handle aspects such as validation, auditing etc. But taking it a step further why not throw concurrency and transaction management into the mix.  &lt;h1&gt;&lt;/h1&gt; &lt;p&gt; &lt;h4&gt;&lt;strong&gt;ENTER LIGHTSPEED&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;While the above paragraph might have a pretty good collection of chapter headers for a software development book, it has all been encapsulated in this brilliant tool called LightSpeed. Mindscape has managed to encapsulate all these concepts in a 200KB dll :)  &lt;p&gt;So what does it do? Well, LightSpeed is a nextG ORM that is described by Mindscape as follows:  &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;LightSpeed is the best high performance .NET domain modeling and O/R mapping framework available. First class LINQ support, Visual Studio 2008 designer integration and our famous high performance core framework means you can create rich domain-driven models more quickly and easily than ever before.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;While you might think that this is a hyped-up marketing statement, and you know how much I hate those, the product is everything that Mindscape says it is. So let’s have a look at the beauties of LightSpeed.  &lt;h5&gt;&lt;/h5&gt; &lt;h5&gt;&lt;/h5&gt; &lt;h3&gt;&lt;strong&gt;The Domain Designer&lt;/strong&gt;&lt;/h3&gt; &lt;p&gt;This a class Diagram on steroids. The domain designer allows you to visualise your domain model, while keeping the basic concepts of Domain Driven Design such as value objects, aggregates and associations intact. A typical Diagram would looks like this:  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mbloQ3Hb4q_Q53QnrQekJ4A5XY3JdPgDg_zBm_Ei4rfmIxcuVz4baLRhNp6EE5pc-3ypUbTK04fT6Mm67uNWBPOX_SZTlEqPO2sU5oFlrhpE_cGN7EDf2AxHNAoO1Jfn53BHqbnqVPWg/image[10].png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="571" alt="image" src="https://saakya.bay.livefilestore.com/y1mPfM_MnffPQQ0rhsiP5C0oqHgdPfckmxyrtxz4bQnMei5LnIuwjrVbsdTk_gx5P8MDoiTcjp0W4tGpUCbNXa5tB5AJT8swOv9mIji7stQZfkUGQa4eYWsL5psaDlsohA9o1_C553m0cY/image_thumb[5].png" width="727" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;So to the above domain model I can add anything of the following objects:  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mFHMRMCuTIAOfgSEFhiUt6YIkYKBOD0HWJXDs6e3yS9LV1G0ARVSgUd5tb3L_kPGgv85ofAvTOOSaoticRA9BTMKLWLFdMlNRzz4vqCO6oOyResMvo4G1nWOE6-rDOmbdE-_QTjrf_GY/image[14].png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="226" alt="image" src="https://saakya.bay.livefilestore.com/y1m6RLjgoE69-bOYHMiBavWdRSPyHWlcwDBIfHgB2wsM4BJfu4_EEIxzpLrHtH8qDSASdHe-anunQ6dRmmGzkYa0_oDu1uQlyj15REUJpC7bsTolBgpxctM9yw6C8DTwGSi5X2pOIKcP6c/image_thumb[7].png" width="310" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;Every entity in the model has the following properties and while I don’t want this to turn into a documentation post, I still feel the urge to explain how Mindscape took the ‘Convention over Configuration’ paradigm to another level.  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mAhUCv3uIPZlPAX9JHge0kuAxM3ennxJpWWu0xbnIR9KGmmxHwk1nv7oUJYORHEleU25XK1MQVwk7HWgkjHmvwGyhL-lP8hdUjvBHv4XS9HLUaMvcq-tpC_m_cYVwAtSkpjj8GNldFyQ/image[19].png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="374" alt="image" src="https://saakya.bay.livefilestore.com/y1mGjqZpAXYfpfN8Gf1ua4JntBpW-YloSfAOzaMmZe9WkaaL67RnD-57xVkmoxyh9LmtJ_P7Bcy3rN_C16_JCQr5Ieot4e5tl0e2WN5o54xlwE7aNMH1z2Rj6-pKYNpL_hrvJIBipMJVco/image_thumb[10].png" width="277" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;Self explanatory isn’t it. Here I have options to provide the following:  &lt;ol&gt; &lt;li&gt;Caching rules.  &lt;li&gt;Visibility rules.  &lt;li&gt;Inheritance and data types of my identity properties.  &lt;li&gt;The sort order.  &lt;li&gt;Data specific properties including  &lt;ol&gt; &lt;li&gt;Optimistic concurrency injection using a single column in my table called ‘LockVersion’.  &lt;li&gt;Tracking of creation and update timings.  &lt;li&gt;Specifying wether this entity is even saved into the database or persistence store at all.  &lt;li&gt;Much more.&lt;/ol&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Ok so enough on the objects and lets get down to properties.  &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mddwsDaZybPW94Zl5rGe1xwgGwRA5OTdqulz1SolbuC3ODUiC9gRTIcr_DBlRwzT4nDOYCeeKQX2ZTnsNfOgOxdsFMTCH4tmPW5odaRgKQY_FVrvtiZK_zPI8iYPyfoYZXllDzPHIwRU/image[25].png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="468" alt="image" src="https://saakya.bay.livefilestore.com/y1mGQZ6Ks-oWwxU8PuEmL8tXEijIwKTlptEEcoKp9UTu1SxpfYRCbas654sJq9ZbazKqYYabo_pwhp0QYRZmmoxAv8agWR0zxlTYJY6nUMzWH1dvI20yVYqUC_6Zf6V_dQBfjZoraQXw_Q/image_thumb[14].png" width="288" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;So again many options:  &lt;ol&gt; &lt;li&gt;Validation.  &lt;li&gt;Aggregation.  &lt;li&gt;Indexing.  &lt;li&gt;Persistence.&lt;/ol&gt; &lt;p&gt;All out of the box, all using very simple tweaks to the design that are so logical to do. If you ask me wether you’re using LightSpeed or not, Mindscape have their conventions setup as anyone should do. Ok so enough on the domain.  &lt;p&gt;Look Ma, I can put my (persistence code in another assembly).  &lt;h4&gt;&lt;strong&gt;PERSISTENCE&lt;/strong&gt;&lt;/h4&gt; &lt;p&gt;Well with tremendous support for LINQ and a very handy set of extension methods, I don’t know where LightSpeed can go wrong. They just have it all figured out. In my repositories I code up pure “data related” code and all I need is to know the definitions of my domain objects.  &lt;p&gt;Here is a typical WCF service operation in LightSpeed and please notice how you never have to map a domain object to a DataContract again.  &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;public&lt;/span&gt; IEnumerable&amp;lt;AxCostCentreDto&amp;gt; GetCostCentres()
{
    &lt;span style="color:#0000ff"&gt;using&lt;/span&gt; (IUnitOfWork unitOfWork = context.CreateUnitOfWork())
    {
        var costCentreContracts = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; Collection&amp;lt;AxCostCentreDto&amp;gt;();
        IList&amp;lt;AxCostCentre&amp;gt; costCentres = unitOfWork.Find&amp;lt;AxCostCentre&amp;gt;();

        &lt;span style="color:#0000ff"&gt;foreach&lt;/span&gt; (AxCostCentre centre &lt;span style="color:#0000ff"&gt;in&lt;/span&gt; costCentres)
.   {
            AxCostCentreDto costCentrecontract = centre.AsDto();
            costCentreContracts.Add(costCentrecontract);
        }

        &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; costCentreContracts;
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Using the usual UnitofWork design pattern, converting my objects into data transfer objects, all too simple. Simple but powerful because again I am provided with options for: 
&lt;ol&gt;
&lt;li&gt;Eager and easy loading. 
&lt;li&gt;Multiple databases support. 
&lt;li&gt;Full Text Search. 
&lt;li&gt;Stored procedures and views support. 
&lt;li&gt;Transactions support.&lt;/ol&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;Add to all that the ease of use and the almost flat learning curve. The list goes on and on. 
&lt;p&gt;&lt;strong&gt;CONCLUSION&lt;/strong&gt; 
&lt;p&gt;LightSpeed has changed my mind on how good ORMs can be. The guys at Mindscape are so helpful and work with customers on personal basis and will always take the time to listen to your problems. The support is just great. While I am not saying that LightSpeed is the answer to every problem out there it is definitely a huge leap in the right direction. Keep doing what you do best Mindscape and keep the new functionalities and goodness flowing. If you got me to become an ORM user then I will go as far as saying “NHibernate, you loose”.
&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; I don’t know how I dared forgetting the awesome person that told me about LightSpeed in the first place. So here goes, thank you Phillip Haydon and sorry for not mentioning it earlier. You’ve shown me the light, or is that LightSpeed. 
  &lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</description><pubDate>Fri, 27 Feb 2009 08:08:35 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/YmZTxNjgd5U/cns!70A5B53D721071B7!473.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!473.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!473')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-03-06T04:33:21.9900000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!473.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!463</guid><category>General</category><title>The Generation Gap</title><description>&lt;p&gt;  &lt;p&gt;&lt;img src="http://i39.tinypic.com/24w7ed0.jpg" /&gt;  </description><pubDate>Thu, 26 Feb 2009 22:06:06 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/hQe7L2G15L0/cns!70A5B53D721071B7!463.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!463.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!463')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-02-26T22:06:06.2230000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!463.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!449</guid><category>Community</category><title>Mitch Denny ------- In Cairo?????!!!!!!</title><description>&lt;p&gt;Well I know Mitch would kill me for this but a little birdie told me that &lt;a href="http://www.notgartner.com" target="_blank"&gt;Mitch Denny&lt;/a&gt; will be presenting in &lt;a href="http://www.facebook.com/home.php#/event.php?eid=63066020983" target="_blank"&gt;Code Camp Cairo&lt;/a&gt;. Wooooot. I am very happy Mitch will be presenting in my hometown and very bummed that I won’t be there to share the experience with him but all the same. Thanks a lot Mitch for doing this I am sure it means a lot to the Egyptian developers as much as it does to me :) &lt;p&gt;Everyone who’s in Cairo at the time, trust me, do not miss Code Camp this year and don’t miss having the chance to chat with Mitch.  &lt;p&gt;Here’s the brief for the session. &lt;blockquote&gt; &lt;p&gt;&lt;em&gt;Mitch Denny is a Principal Consultant at Readify, an Australian-based software development consultancy focused on helping organisations successfully adopt the latest Microsoft technologies. As a Visual Studio Team System MVP, Mitch has extensive experience helping development organisations adopt the Team System suite of tools.&lt;/em&gt; &lt;p&gt;&lt;em&gt;In this session Mitch will show you how to tackle some of the more practical aspects of team development using Team Foundation Server and the Visual Studio client tools. The session will cover:&lt;/em&gt; &lt;p&gt;&lt;em&gt;1. Establishing a source tree.&lt;/em&gt; &lt;p&gt;&lt;em&gt;2. Automating the build process using Team Build and MSTest.&lt;/em&gt; &lt;p&gt;&lt;em&gt;3. Linking builds using dependency replication for complex projects.&lt;/em&gt; &lt;p&gt;&lt;em&gt;4. Branching strategies that work in Team Foundation Server.&lt;/em&gt; &lt;p&gt;&lt;em&gt;5. Automating the deployment of builds from Team Foundation Server.&lt;/em&gt;&lt;/blockquote&gt; &lt;p&gt;Register today at &lt;a href="http://codecamp09.eventbrite.com/"&gt;http://codecamp09.eventbrite.com/&lt;/a&gt;  </description><pubDate>Sun, 01 Feb 2009 18:56:33 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/gVNGjPL-wNQ/cns!70A5B53D721071B7!449.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!449.entry#comment</comments><slash:comments>2</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!449')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-02-01T18:58:40.2030000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!449.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!448</guid><category>Architecture</category><title>PostSharp &amp; The Policy Injection Application Block</title><description>&lt;p&gt;By now we all have heard of postsharp. By now we would have all used it once or twice or we would be using it on daily basis now.  I am not going to go into what postsharp does since you can read all about &lt;a href="http://www.postsharp.org/" target="_blank"&gt;here&lt;/a&gt;. But what’s more important to me was understanding what it facilitates. &lt;h1&gt;Scenario&lt;/h1&gt; &lt;p&gt;So let’s say you get so far down a project and decide you want global exception handling and logging applied to your application. Kind of what the exception handling &amp;amp; logging application blocks do together with policy injection. So now you want to supply that functionality with the least impact possible to your code, deadlines and other constraints. &lt;h2&gt;Policy Injection – Enterprise Library&lt;/h2&gt; &lt;p&gt;So what impact would we have with policy injection. Well first of all we have to have the following assumptions: &lt;p&gt;Our classes need to implement an interface OR Our classes need to inherit from MarshalByRefObject &lt;p&gt;Now that in itself is very limiting because we cannot guarantee such a requirement but let’s take an optimistic step and say that the requirement is sufficed. We now have to go into every class’s instantiation and use the policy injection application block’s wrap or create method. But that’s a lot of impact on the code if we are working on an application with a decently sized object model or too many operations. So how’s postsharp better. &lt;h2&gt;PostSharp – Injection with power&lt;/h2&gt; &lt;p&gt;So with postsharp we create these things called aspects. So for the scenario above we would create two aspects one for exception handling and one for logging. To make this interesting let’s say we want to you use the exception handling application block to handle the exceptions and log any exceptions to a text file called trace.log. For the logging we want to just write to the console.  &lt;p&gt;I start of by creating an aspects project in my solution (optional). &lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mkZ_OJgVGy7rs7c6rj2nhR42Qor-nnWjyBmcZnSAPjHuNTaoVpS49vdfjWQvJQfqEP5pjwpM8o0tgvN2xAnQuwduPFBNjy1hL2CUfjyaNWUDMCX5eLyOmVANarXlhtkKr9CJi4iu2ueQ/image[2].png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="85" alt="image" src="https://saakya.bay.livefilestore.com/y1mqmzewDx4WKlKhMYZEVvrc0OQTG8IyAh-vTCi0ofKERMow7zZwgbl9YW1dAPnO7aN19A_1-R0cUjN8sKwkplXwNBmBnDWVM7DyLgXZE5auK-fZ1-C0qLfh05IMHW3pRuZ2JMwUFBdJwY/image_thumb.png" width="206" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;I then reference the necessary PostSharp assemblies, PostSharp.Public &amp;amp; PostSharp.Laos. &lt;p&gt; &lt;a href="https://saakya.bay.livefilestore.com/y1mJdzIgFvESUHprzokwqzmsJAicws8_f3mSvgBpCIYiK7S7LVNLM4C7RoGBLN1Fvo76wz5LkS-VC0dhk5RvtklScmbxthsJgP9w9pxKCmROISddcycmsRV2qpXa7SV5X31g3vg0LPABgM/image[6].png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="181" alt="image" src="https://saakya.bay.livefilestore.com/y1monv_1gDvL8MKv9sKvqoI2s_dqHLJWuv9sSsTGjjrkhX0JgD3Rt7uaEOMjgFF1BcQUlkblE3jYimnLluDAR80ZPk7XdgoLlQ7NG_gw3ZyqV2Z3-OFRJfgfQ7OBzGB4BGkgxoklsTC3_U/image_thumb[2].png" width="383" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;My Exception aspect would look something like this after inheriting from the base OnExceptionAspect base class from the PostSharp library. &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; PostSharp.Laos;

&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; PostSharpDemo.Aspects
{
    &lt;span style="color:#008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// This is a test exception aspect that will be injected into&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// the business project. The aspect catches any unhandled&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// exceptions and uses the exception handling application block&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// to handle the exception.&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
    [Serializable]
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;sealed&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; MyExceptionAspect : OnExceptionAspect
    {
        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; OnException(MethodExecutionEventArgs eventArgs)
        {
            &lt;span style="color:#0000ff"&gt;bool&lt;/span&gt; rethrow = ExceptionPolicy.HandleException(eventArgs.Exception, &lt;span style="color:#006080"&gt;&amp;quot;Demo Exception Policy&amp;quot;&lt;/span&gt;);

            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (rethrow)
            {
                Console.WriteLine(eventArgs.Exception.Message);
                Console.WriteLine(&lt;span style="color:#006080"&gt;&amp;quot;Exception being handled by aspect!&amp;quot;&lt;/span&gt;);
            }
        }
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and my logging aspect would looks as follows
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;
&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; PostSharp.Laos;

&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; PostSharpDemo.Aspects
{
    &lt;span style="color:#008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// This aspct is defined to demo tracing capability &lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// with postsharp usage in AOP.&lt;/span&gt;
    &lt;span style="color:#008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;
    [Serializable]
    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; MyOnMethodInvocationAspect : OnMethodInvocationAspect
    {
        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff"&gt;void&lt;/span&gt; OnInvocation(MethodInvocationEventArgs context)
        {
            Console.WriteLine(&lt;span style="color:#006080"&gt;&amp;quot;Calling {0}&amp;quot;&lt;/span&gt;, context.Delegate.Method);
            context.Proceed();
        }
    }
}&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;
&lt;p&gt;That’s it for our project. It’s as simple as that. Now how do we use this with our target assembly i.e. how do we inject those aspects? We first of all reference the assembly and the PostSharp assemblies again.
&lt;p&gt;&lt;a href="https://saakya.bay.livefilestore.com/y1mSbrVmIYtVvSPs3Jwp-ouqmd4Unl7PtazyHWUfYOltT5TMScGJkpuG_v-CBaYyw9u5tcmp4LLTvOJTC5dfcl6nbGiP9ODP7e0LiPcJ-x3Yjl-JJIN_QUnUlShAOYiU6a6fyGiynh0Vc8/image[9].png" rel="WLPP"&gt;&lt;img title="image" style="border-top-width:0px;display:inline;border-left-width:0px;border-bottom-width:0px;border-right-width:0px" height="224" alt="image" src="https://saakya.bay.livefilestore.com/y1mWkVV8uT7ySKiKQ2uTSXSF9R0ayS4ThW2CXVWJJie59mnCHweEEZV3fbnB9aNqT266QwYEDRrdfn4a4akj7aCVgQ5-Di2yneQDCqm1NNfXussqrRBVokio_-6_nCycsOz6oMTjEpdPg4/image_thumb[3].png" width="244" border="0" /&gt;&lt;/a&gt; 
&lt;p&gt;and for the final piece of the puzzle we place the following couple of lines in our assembly.info (or any other file in the project really).
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;&lt;span style="color:#008000"&gt;// by using the '*' as shown below:&lt;/span&gt;
&lt;span style="color:#008000"&gt;// [assembly: AssemblyVersion(&amp;quot;1.0.*&amp;quot;)]&lt;/span&gt;

[assembly: AssemblyVersion(&lt;span style="color:#006080"&gt;&amp;quot;1.0.0.0&amp;quot;&lt;/span&gt;)]
[assembly: AssemblyFileVersion(&lt;span style="color:#006080"&gt;&amp;quot;1.0.0.0&amp;quot;&lt;/span&gt;)]


&lt;strong&gt;&lt;span style="color:#008000"&gt;//PostSharp assembly injection.&lt;/span&gt;

[assembly:
    MyExceptionAspect(AttributeTargetAssemblies = &lt;span style="color:#006080"&gt;&amp;quot;PostSharpDemo.Business&amp;quot;&lt;/span&gt;,
        AttributeTargetTypes = &lt;span style="color:#006080"&gt;&amp;quot;PostSharpDemo.Business.*&amp;quot;&lt;/span&gt;)]
[assembly:
    MyOnMethodInvocationAspect(AttributeTargetAssemblies = &lt;span style="color:#006080"&gt;&amp;quot;PostSharpDemo.Business&amp;quot;&lt;/span&gt;,
        AttributeTargetTypes = &lt;span style="color:#006080"&gt;&amp;quot;PostSharpDemo.Business.*&amp;quot;&lt;/span&gt;)]&lt;/strong&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;
&lt;p&gt;Build, run and voila every single method executed within the assembly is traced to the console and any unhandled exception will be directed at the Exception Handling Application block for policy processing.
&lt;p&gt;The demo solution can be downloaded here.
&lt;p&gt;&lt;iframe style="border-right:#dde5e9 1px solid;padding-right:0px;border-top:#dde5e9 1px solid;padding-left:0px;padding-bottom:0px;margin:3px;border-left:#dde5e9 1px solid;width:240px;padding-top:0px;border-bottom:#dde5e9 1px solid;height:66px;background-color:#ffffff" marginwidth="0" marginheight="0" src="http://cid-70a5b53d721071b7.skydrive.live.com/embedrowdetail.aspx/Public/Source Code/PostSharpDemo.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;
&lt;p&gt;I hope at this stage you are already happy with the possibilities. But wait there is more. 
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;PostSharp bundled with PIAB&lt;/h2&gt;
&lt;p&gt;So is the policy injection application block useless now. Absolutely not. It still has it’s place and I see even the bigger potential is to treat both tools as power tools to be used in the correct scenarios. My wondering brain made me think of the possibility of using PostSharp to apply policy injection on all the classes in an assembly just to find out that this has already been thought of. You can find the project PostSharp4Entlib at &lt;a title="http://www.codeplex.com/entlibcontrib/Wiki/View.aspx?title=PostSharp4EntLib&amp;amp;referringTitle=Home" href="http://www.codeplex.com/entlibcontrib/Wiki/View.aspx?title=PostSharp4EntLib&amp;amp;referringTitle=Home"&gt;http://www.codeplex.com/entlibcontrib/Wiki/View.aspx?title=PostSharp4EntLib&amp;amp;referringTitle=Home&lt;/a&gt;
&lt;p&gt;Now how is this so special? Well two things:
&lt;ol&gt;
&lt;li&gt;PolicyInjection now will happen at compile time not at run time, so there is a significant gain in performance including the fact that you wouldn’t need to have the PIAB configuration section in the configuration file at runtime anymore. Note: you still need the configuration sections for the other application blocks. 
&lt;li&gt;The limitation of having the classes implement an interface or inherit from MarshalByRefObject is now gone, since we don’t need any runtime injection to the objects.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;There was one issue though. The project on codeplex had a lot of build errors regarding assembly versions etc. I took the liberty of combining the newest pieces, PostSharp 1.0 Sp1, Entlib 4.0 &amp;amp; PostSharp4Entlib and building my own little solution while fixing all the build errors. I also came up with a little sample demo to demonstrate the usage of the library. So now one line of code in AssemblyInfo.cs 
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;height:41px;background-color:#f4f4f4"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"&gt;[assembly: InjectPoliciesFromConfiguration(&lt;span style="color:#006080"&gt;&amp;quot;Entlib.config&amp;quot;&lt;/span&gt;)]&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;results in the same effect that would have had to cost me instantiating or wrapping every class using policy injection or having the limitation on the objects having to inherit or implement interfaces or other classes. 
&lt;p&gt;A PostSharpForEntlib updated project and a demo can be downloaded here.
&lt;p&gt;&lt;iframe style="border-right:#dde5e9 1px solid;padding-right:0px;border-top:#dde5e9 1px solid;padding-left:0px;padding-bottom:0px;margin:3px;border-left:#dde5e9 1px solid;width:240px;padding-top:0px;border-bottom:#dde5e9 1px solid;height:66px;background-color:#ffffff" marginwidth="0" marginheight="0" src="http://cid-70a5b53d721071b7.skydrive.live.com/embedrowdetail.aspx/Public/Source Code/PostSharpForEntlib.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;
&lt;p&gt;I hope this has been useful. Happy Injection! :)  &lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</description><pubDate>Sun, 01 Feb 2009 15:58:43 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/OcPJvaXSf-8/cns!70A5B53D721071B7!448.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!448.entry#comment</comments><slash:comments>2</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!448')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-02-01T19:08:05.1300000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!448.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!438</guid><category>General</category><title>The trips of life</title><description>&lt;p align="justify"&gt;What a couple of months I’ve had with a lot of exposure to lifetime worth experiences. I started December by flying over to Abu Dhabi - United Arab Emirates where I was in transit for 6 hours but I got to see my dad and my little brother so it was a very intensive 6 hours. I flew to Egypt after that where I spent 3 days and then flew to Saudi Arabia to do pilgrimage which was very needed spiritual experience at this stage in my life.  &lt;p align="justify"&gt;I spent 12 days in Saudi Arabia before heading back to Cairo and it was time to organise some meetings with various companies and present at user groups. I wanted to get as much as possible interaction with the Egyptian developer community and it was absolutely both amazing and most rewarding. I presented at the &lt;a href="http://dotnetwork.org/Web/Default.aspx" target="_blank"&gt;DotNetWorks user group&lt;/a&gt; in Cairo at the Canadian International College. You can read &lt;a href="http://geekswithblogs.net/Mohamed/archive/2008/12/29/dotnetwork-10th-architecture-speaking-for-itself-di--aop-again.aspx" target="_blank"&gt;a beautiful review&lt;/a&gt; on this by one of the most brilliant architects I encountered &lt;a href="http://geekswithblogs.net/Mohamed/Default.aspx" target="_blank"&gt;Mr. Mohamed Meligy.&lt;/a&gt; I got to meet a lot of good architects and visionaries such as Mohamed Sami, &lt;a href="http://mosesofegypt.net/" target="_blank"&gt;Mohamed Musa&lt;/a&gt; and last but by no means least Remon Zakaria the CEO of a very promising company, &lt;a href="http://www.dashsoft.com/" target="_blank"&gt;DashSoft&lt;/a&gt; and one of the main organisers in the DotNetWork team.  &lt;p align="justify"&gt;I spent the time between family, friends and companies and what fascinated me is how many Egyptian companies were actually doing software development with the newest of tools and latest of paradigms. The only thing I was wondering about there, is the possibility of success for a 100% virtual company in Egypt but that’s a discussion for another time.  &lt;p align="justify"&gt;I left Egypt to spend a week between Emirates and Qatar visiting family and friends but again taking the chance to investigate the developers community and the companies in the gulf area. It was a more specialised market and it was interesting how many &lt;a href="http://www.microsoft.com/dynamics/default.mspx" target="_blank"&gt;Microsoft Dynamics&lt;/a&gt; products were being utilised in that area. CRM, AX, Great Plains etc. A very specialised market with a lot of potential for growth but in my opinion, when it comes to software development the Arabian gulf is more of a buyer\outsourcer than a producer.  &lt;p align="justify"&gt;Meeting with people from Microsoft in all the travel in the middle east opened my eyes to a totally different approach of Microsoft in those areas to that followed in Sydney. Again, that’s a discussion for another time so ping me if you want to know more. &lt;p align="justify"&gt;I got back to Sydney to spend one week and then fly out to Kuala Lumpur, Malaysia.  I am here on a very interesting architecture engagement that’s proving very rewarding since it’s exposing me to know the internals and integration point of Microsoft's Dynamics AX 2009. Very interesting product to say the least. I will be spending another week here from today and then heading back to Sydney and hopefully settling down without travel for a bit. &lt;p align="justify"&gt;Well that’s it the brief from me and hopefully I’ll be back to blogging more regularly when I get settled. I definitely have a lot to share from my leanings in the past few weeks.  &lt;p align="justify"&gt;Check out the photos from the gadget mall in Kuala Lumpur. &lt;p&gt;&lt;iframe style="border-right:#dde5e9 1px solid;padding-right:0px;border-top:#dde5e9 1px solid;padding-left:0px;padding-bottom:0px;margin:3px;border-left:#dde5e9 1px solid;width:240px;padding-top:0px;border-bottom:#dde5e9 1px solid;height:66px;background-color:#ffffff" marginwidth="0" marginheight="0" src="http://cid-70a5b53d721071b7.skydrive.live.com/embedrowdetail.aspx/Malaysia Gadgets Mall" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;  </description><pubDate>Sun, 01 Feb 2009 14:36:40 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/Grsp59ny88E/cns!70A5B53D721071B7!438.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!438.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!438')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2009-02-01T14:36:40.6570000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!438.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!337</guid><category>General</category><title>Presenting In Cairo!</title><description>&lt;p&gt;                                                                                                                                                              
&lt;p&gt;So been missing in action in a while. Not because I am getting I am getting lazy, in fact I never felt like I’ve been this active for a very long time. I arrived in Cairo and stayed for 48 hours before kicking off to Saudi Arabia for the most spiritual experience I ever had. I have been back in Cairo for 4 days and been floating from company to company trying to get a feel for the IT industry in the middle east in general and specifically Egypt. Let’s just say that there were impressive people and places but by the same token a lot of places that need improvement. 
&lt;p&gt;Good news is as usual, never mess a chance to present to a new audience. On the 27th of Dec I will be presenting at the dotNetWorks user group at the Canadian International College in Cairo. I will be talking about future trends of architecture. Should be ultimate fun presenting for the first time in Franco Arab. 
&lt;p&gt;I also met the Architecture Evangelist at Microsoft Cairo (SmartVillage) &lt;a target="_blank" href="http://www.facebook.com/people/Mohamed-Nar/522724922"&gt;Mohamed Nar&lt;/a&gt;. The reason I mention him over anyone else is simply because he gave the most detailed and honest insight on the entire industry in Cairo and specifically how architecture is perceived here. I am hoping to do an arcast with Nar before leaving but if not then I am definitely coming back here for more talks in 2009. 
&lt;p&gt;That’s it from me for now. Miss you all Sydney lads.</description><pubDate>Tue, 16 Dec 2008 22:45:38 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/u0cGpMOHnhg/cns!70A5B53D721071B7!337.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!337.entry#comment</comments><slash:comments>2</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!337')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2008-12-16T22:47:42.5600000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!337.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!331</guid><category>General</category><title>10 Ways to Give a Bad Presentation</title><description>&lt;p&gt;                                                                                                                                                           Was reading through &lt;a target="_blank" href="http://www.beyondbulletpoints.com/blog/?p=217"&gt;this&lt;/a&gt; today. Very valuable for presenters.&lt;/p&gt; &lt;p&gt;Sarcastically,&lt;/p&gt; &lt;blockquote&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Put all the words of your presentation on the slides&lt;/strong&gt;. If they don’t fit, just make the font size smaller — after all, you’re using less paper! If that’s still not enough space, remember you still have #7. You could add more slides, but then you kill more electricity and trees (if you print the slides). &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Read everything on the slides&lt;/strong&gt;. Sure, throw in a few useless comments here and there. No one in the audience can read besides you want them to look at you not the words on the slides. Saying them aloud makes them look at you (and roll their eyes). &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Say, “Um” and “Uh” often&lt;/strong&gt;. That will send your audience crawling up the walls. They love the sounds they make. &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Skip checking the equipment before the presentation&lt;/strong&gt;. It’ll work. Technology never fails. Besides, you have a print out of your presentation and notes. Just read them if the overhead dies. &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Use many colors&lt;/strong&gt;. Pink, purple, blue, yellow — especially yellow, and green reminds the audience of the ’60s and should relax them in no time. Peace, man. &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Capitalize everything&lt;/strong&gt;. That’s right. Sentences Should Be Like Book Titles. BETTER YET, DO THIS AND CAPITALIZE EVERY LETTER. That should drill your words into the audience’s heads. &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Write down your entire speech and read it&lt;/strong&gt;. Word. For. Word. That way you never have to look up and at the audience. They don’t want to connect with you and looking up will let that happen. &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Keep your hands in your pockets at all times&lt;/strong&gt;. If you have coins in your pocket, jiggle them for a little background music. No pockets? Just sit stiffly in the same spot behind the platform and fidget so you can burn extra calories. &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Don’t waste time rehearsing&lt;/strong&gt;. This is a speech not a play. It’s not as if we can’t have our script in front of us like actors. See #7 again. Besides, who has time to rehearse? &lt;/em&gt; &lt;li&gt;&lt;em&gt;&lt;strong&gt;Speak for as long as you want&lt;/strong&gt;. The audience will leave whenever they need to. So don’t worry about them. Just say everything you can think of so you can show the audience how knowledgeable you are about the subject. Besides, who wants to have time left for questions? The audience only asks stupid questions.&lt;/em&gt;&lt;/li&gt;&lt;/blockquote&gt; &lt;p&gt;Ahhh, so truue!&lt;/p&gt;</description><pubDate>Wed, 19 Nov 2008 10:59:04 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/zf4XA-zjIyM/cns!70A5B53D721071B7!331.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!331.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!331')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2008-11-19T10:59:04.4230000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!331.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!330</guid><category>SQL Server</category><title>SQL still serves</title><description>&lt;p&gt; &lt;/p&gt; &lt;p&gt;Great Read.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.sdtimes.com/link/33057"&gt;http://www.sdtimes.com/link/33057&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 19 Nov 2008 10:52:59 Z</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/em12PMXRXiY/cns!70A5B53D721071B7!330.entry</link><comments>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!330.entry#comment</comments><slash:comments>0</slash:comments><live:type>blogentry</live:type><live:typelabel>Blog Entry</live:typelabel><wfw:commentRss>http://cid-70a5b53d721071b7.users.api.live.net/Users(8117093178916499895)/Blogs('70A5B53D721071B7!105')/Entries('70A5B53D721071B7!330')/Comments?$format=application%2frss%2bxml</wfw:commentRss><dcterms:modified>2008-11-19T10:53:18.4300000Z</dcterms:modified><feedburner:origLink>http://omarbesiso.spaces.live.com/Blog/cns!70A5B53D721071B7!330.entry</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!230</guid><title>Blog Images</title><pubDate>Sat, 27 Sep 2008 05:03:10 -0700</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/Hrn23norPBg/70A5B53D721071B7!230</link><live:type>photoalbum</live:type><live:typelabel>Photo Album</live:typelabel><dcterms:modified>2009-01-29T02:54:00.9800000Z</dcterms:modified><cf:itemRSS>http://cid-70a5b53d721071b7.spaces.live.com/photos/cns!70A5B53D721071B7!230/feed.rss</cf:itemRSS><feedburner:origLink>http://cid-70a5b53d721071b7.skydrive.live.com/browse.aspx/.res/70A5B53D721071B7!230?ct=photos</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!352</guid><title>Malaysia Gadgets Mall</title><pubDate>Sat, 31 Jan 2009 20:53:12 -0800</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/3yRRcoY_72s/70A5B53D721071B7!352</link><live:type>photoalbum</live:type><live:typelabel>Photo Album</live:typelabel><dcterms:modified>2009-02-01T04:58:49.0430000Z</dcterms:modified><cf:itemRSS>http://cid-70a5b53d721071b7.spaces.live.com/photos/cns!70A5B53D721071B7!352/feed.rss</cf:itemRSS><feedburner:origLink>http://cid-70a5b53d721071b7.skydrive.live.com/browse.aspx/.res/70A5B53D721071B7!352?ct=photos</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!423</guid><title>Abdullah Besiso</title><pubDate>Sun, 01 Feb 2009 02:40:07 -0800</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/-pQDsxT5iD8/70A5B53D721071B7!423</link><live:type>photoalbum</live:type><live:typelabel>Photo Album</live:typelabel><dcterms:modified>2009-02-01T10:47:23.7130000Z</dcterms:modified><cf:itemRSS>http://cid-70a5b53d721071b7.spaces.live.com/photos/cns!70A5B53D721071B7!423/feed.rss</cf:itemRSS><feedburner:origLink>http://cid-70a5b53d721071b7.skydrive.live.com/browse.aspx/.res/70A5B53D721071B7!423?ct=photos</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!499</guid><title>Parso's World Greatest Shave</title><pubDate>Sat, 14 Mar 2009 23:54:09 -0700</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/mWTni5Y9Ku8/70A5B53D721071B7!499</link><live:type>photoalbum</live:type><live:typelabel>Photo Album</live:typelabel><dcterms:modified>2009-03-15T06:56:57.3800000Z</dcterms:modified><cf:itemRSS>http://cid-70a5b53d721071b7.spaces.live.com/photos/cns!70A5B53D721071B7!499/feed.rss</cf:itemRSS><feedburner:origLink>http://cid-70a5b53d721071b7.skydrive.live.com/browse.aspx/.res/70A5B53D721071B7!499?ct=photos</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!148</guid><title>TechEd 2008</title><pubDate>Wed, 17 Sep 2008 05:33:38 -0700</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/DKkQmuwCkf4/70A5B53D721071B7!148</link><live:type>photoalbum</live:type><live:typelabel>Photo Album</live:typelabel><dcterms:modified>2008-09-17T12:34:49.5700000Z</dcterms:modified><cf:itemRSS>http://cid-70a5b53d721071b7.spaces.live.com/photos/cns!70A5B53D721071B7!148/feed.rss</cf:itemRSS><feedburner:origLink>http://cid-70a5b53d721071b7.skydrive.live.com/browse.aspx/.res/70A5B53D721071B7!148?ct=photos</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!175</guid><title>Blog Images</title><pubDate>Wed, 17 Sep 2008 06:21:08 -0700</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/4OylcYMiskc/70A5B53D721071B7!175</link><live:type>photoalbum</live:type><live:typelabel>Photo Album</live:typelabel><dcterms:modified>2008-09-17T13:21:23.5630000Z</dcterms:modified><cf:itemRSS>http://cid-70a5b53d721071b7.spaces.live.com/photos/cns!70A5B53D721071B7!175/feed.rss</cf:itemRSS><feedburner:origLink>http://cid-70a5b53d721071b7.skydrive.live.com/browse.aspx/.res/70A5B53D721071B7!175?ct=photos</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!187</guid><title>Blog Images</title><pubDate>Sat, 20 Sep 2008 08:02:03 -0700</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/4Gh4il_wKCY/70A5B53D721071B7!187</link><live:type>photoalbum</live:type><live:typelabel>Photo Album</live:typelabel><dcterms:modified>2008-09-25T13:26:58.4570000Z</dcterms:modified><cf:itemRSS>http://cid-70a5b53d721071b7.spaces.live.com/photos/cns!70A5B53D721071B7!187/feed.rss</cf:itemRSS><feedburner:origLink>http://cid-70a5b53d721071b7.skydrive.live.com/browse.aspx/.res/70A5B53D721071B7!187?ct=photos</feedburner:origLink></item><item><guid isPermaLink="false">70A5B53D721071B7!193</guid><title>Wallpapers</title><pubDate>Mon, 22 Sep 2008 03:28:13 -0700</pubDate><link>http://feedproxy.google.com/~r/OmarBesiso/~3/6dVYxrJlpBs/70A5B53D721071B7!193</link><live:type>photoalbum</live:type><live:typelabel>Photo Album</live:typelabel><dcterms:modified>2008-09-22T10:28:50.6300000Z</dcterms:modified><cf:itemRSS>http://cid-70a5b53d721071b7.spaces.live.com/photos/cns!70A5B53D721071B7!193/feed.rss</cf:itemRSS><feedburner:origLink>http://cid-70a5b53d721071b7.skydrive.live.com/browse.aspx/.res/70A5B53D721071B7!193?ct=photos</feedburner:origLink></item></channel></rss>
