<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Problem Solver : LINQ</title><link>http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx</link><description>Tags: LINQ</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Nederlandse CodeCamp 2009</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2009/10/19/nederlandse-codecamp-2009.aspx</link><pubDate>Mon, 19 Oct 2009 10:26:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1732965</guid><dc:creator>Maurice</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1732965</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2009/10/19/nederlandse-codecamp-2009.aspx#comments</comments><description>&lt;p&gt;Op 21 november 2009 organiseren de &lt;a href="http://www.sdn.nl"&gt;SDN&lt;/a&gt;, &lt;a href="http://www.dotned.nl"&gt;Stichting dotNed&lt;/a&gt; en &lt;a href="http://www.VBcentral.nl"&gt;VBcentral&lt;/a&gt; samen het derde Nederlandse &lt;a href="http://www.codecamp.nl"&gt;Code Camp&lt;/a&gt;. Dit is een dag lang met code, code sharing, freaking en gezellig samenzijn. Een evenement door ontwikkelaars, voor ontwikkelaars. De regie ligt voor een belangrijk deel bij de deelnemers! Het aantal plaatsen voor deelnemers is wel beperkt tot maximaal 150. Wacht dus niet te lang met beslissen want voor je het weet is er geen plaats meer. Vergeet bij je aanmelding niet op te geven welke onderwerpen je interesse hebben. Bovendien nodigen we iedereen graag uit om zelf een sessie in te vullen.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Op de website, &lt;a href="http://www.codecamp.nl"&gt;www.codecamp.nl&lt;/a&gt;, vind je meer informatie en kan je je aanmelden.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1732965" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Visual+FoxPro/default.aspx">Visual FoxPro</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/webcast/default.aspx">webcast</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SDN/default.aspx">SDN</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Combined DevelopMentor instructors blog feed.</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2009/08/19/combined-developmentor-instructors-blog-feed.aspx</link><pubDate>Wed, 19 Aug 2009 07:37:12 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1716590</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1716590</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2009/08/19/combined-developmentor-instructors-blog-feed.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://twitter.com/mkennedy"&gt;Michael Kennedy&lt;/a&gt;, one of the co instructors from &lt;a href="http://www.develop.com/"&gt;DevelopMentor&lt;/a&gt;, has created a combined feed from all the blogs of the various DevelopMentor. An awesome group of people with a lot of knowledge to share. Highly recommended in you RSS reader.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://feeds.feedburner.com/DevelopmentorInstructors"&gt;http://feeds.feedburner.com/DevelopmentorInstructors&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;If you want to check out a list of the individual blog feeds look &lt;a href="http://www.develop.com/blogs"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.theproblemsolver.nl/"&gt;www.TheProblemSolver.nl &lt;/a&gt;   &lt;br /&gt;&lt;a href="http://wiki.windowsworkflowfoundation.eu/"&gt;Wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1716590" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Data+Access/default.aspx">Data Access</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VS2010/default.aspx">VS2010</category></item><item><title>Want to download all MIX sessions?</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2009/03/31/want-to-download-all-mix-sessions.aspx</link><pubDate>Tue, 31 Mar 2009 06:52:40 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1683235</guid><dc:creator>Maurice</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1683235</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2009/03/31/want-to-download-all-mix-sessions.aspx#comments</comments><description>&lt;p&gt;Then you should check Mike Swanson’s blog post &lt;a href="http://blogs.msdn.com/mswanson/archive/2009/03/26/mix09-keynote-and-session-videos.aspx"&gt;here&lt;/a&gt;. He has two batch files, the first downloads all MIX session recordings with in the format you like, the second renames them so it is easier to make sense of all the media file names.&lt;/p&gt;  &lt;p&gt;If you just want a list of all sessions with download links &lt;a href="http://videos.visitmix.com/MIX09/All"&gt;this&lt;/a&gt; page might be the thing for you.&lt;/p&gt;  &lt;p&gt;So much better than downloading them by hand. Not as good as going to the MIX itself but if you, like me, couldn’t go it is still a nice way to see all the content.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1683235" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/webcast/default.aspx">webcast</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/IronPython/default.aspx">IronPython</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Software Development Event march 30th</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2009/03/23/software-development-event-march-30th.aspx</link><pubDate>Mon, 23 Mar 2009 15:40:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1680616</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1680616</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2009/03/23/software-development-event-march-30th.aspx#comments</comments><description>&lt;p&gt;Just one week to go to the next Software Development Event. The schedule with all the sessions is looking good. But this time there is even more! &lt;/p&gt;  &lt;p align="center"&gt;&lt;img height="384" src="http://blogs.microsoft.nl/blogs/ux/MSSC_34View_7C1948A0.jpg" width="572" alt="" /&gt; &lt;/p&gt;  &lt;p&gt;We will have a Microsoft &lt;a href="http://www.microsoft.com/surface/"&gt;Surface&lt;/a&gt; machine somewhere in the common area for people to try our. And if you have never played, oops tested, with a Surface machine before this is a truly exiting machine!&lt;/p&gt;  &lt;p&gt;Just goes to show, the SDN will go to extraordinary efforts to please all attendees &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt; &lt;/p&gt;  &lt;p&gt;You can see the full schedule &lt;a href="http://www.sdn.nl/SDN/SDNEvent/tabid/68/Default.aspx"&gt;here&lt;/a&gt;. And don’t forget, we are &lt;strong&gt;not&lt;/strong&gt; in Ede this time but in a great new &lt;a href="http://www.debergsebossen.nl/"&gt;location&lt;/a&gt; in Driebergen.&lt;/p&gt;  &lt;p&gt;Hope to see everyone there next week Monday.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.theproblemsolver.nl/"&gt;www.TheProblemSolver.nl &lt;/a&gt;   &lt;br /&gt;&lt;a href="http://wiki.windowsworkflowfoundation.eu/"&gt;Wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And now on Twitter at &lt;a title="http://twitter.com/mauricedb" href="http://twitter.com/mauricedb"&gt;http://twitter.com/mauricedb&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1680616" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SDN/default.aspx">SDN</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Looking back at the MVP Summit</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2009/03/07/looking-back-at-the-mvp-summit.aspx</link><pubDate>Sat, 07 Mar 2009 11:08:09 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1676278</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1676278</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2009/03/07/looking-back-at-the-mvp-summit.aspx#comments</comments><description>&lt;p&gt;Last week lots of MVP, myself included, where in Redmond visiting Microsoft on our yearly MVP pilgrimage. The MVP Summit is always a great event. Not only do we get to talk to the MS team members who actually design and build all the software we love and use but we also get to meet each other. And with MVP’s being located around the world that is kind of rare as well.&lt;/p&gt;  &lt;p&gt;Despite this being a great event I still have very mixed feelings about this last MVP summit. The problem isn’t the events itself or the people I met, that was al great &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;. No the problem was in some of the technological decisions made in product groups. Unfortunately I can’t divulge details yet because I have signed an NDA but as soon .NET 4.0 as beta 1 is made public I will be able to blog about some of these decisions. And rest assured I will!&lt;/p&gt;  &lt;p&gt;The reason we really need to is the way these important changes are communicated. Or should I say not communicated. Some very important changes where not communicated at all and could only be derived by bullet points missing from PowerPoint slides. Only when directly asked about the missing bullet point would someone say “Yes that is right, we decided to …. NDA … because … NDA …”. Sorry about the NDA part &lt;img src="http://msmvps.com/emoticons/emotion-6.gif" alt="Sad" /&gt;.&lt;/p&gt;  &lt;p&gt;I can only say that these decisions are a big problem and I know several MVP’s who decided to skip other sessions on the same product as a result. I didn’t, as far as I am concerned ignoring a problem is not going to make it go away, but I really think this product team needs to reevaluate this decision and the general future trend.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Despite this hiccup I am very exited about lots of the things I got to see and am really looking forward to .NET 4 and Visual Studio 2010. Now if we only could have a beta today &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;. When we will have a first beta is still a big question though. If a date was announced I missed it, the best I heard was a quarter and is quite a time span.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Enjoy.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.theproblemsolver.nl/"&gt;www.TheProblemSolver.nl &lt;/a&gt;   &lt;br /&gt;&lt;a href="http://wiki.windowsworkflowfoundation.eu/"&gt;Wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1676278" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WF4/default.aspx">WF4</category></item><item><title>Consuming an ADO.NET Data Service from Silverlight</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2009/01/06/consuming-an-ado-net-data-service-from-silverlight.aspx</link><pubDate>Tue, 06 Jan 2009 12:02:05 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1658628</guid><dc:creator>Maurice</dc:creator><slash:comments>15</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1658628</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2009/01/06/consuming-an-ado-net-data-service-from-silverlight.aspx#comments</comments><description>&lt;p&gt;When developing Silverlight line of business (LOB) applications we often need to get at some data from a database. There are various ways to do so. One option that is easy to get started with with is creating an ADO.NET Entity Data Model (EDM) and exposing that entity model using an ADO.NET Data Service.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Getting started&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The first thing we need to create is an ASP.NET Web Application. This is basically going to act as a container for our Data Service and our Silverlight LOB application. As you can see below I named the Web Application SLDataService.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_32B54959.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="167" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_04AA3BB8.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Next we need to add the ADO.NET Entity Data Model. I already have a Northwind SQL Server database on my machine and that is the database I am going to expose to I am naming the EDM Northwind.edmx.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_0F6A23BE.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="149" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_4A78928D.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;When the popup ask if I want to create a new EDM based on an existing database or start from scratch I selected the existing database option and pointed it at my Northwind database. This lets me select the tables I want to import. In this case I am only interested in the Customers table so that is what I am importing. By default the class name will be the same as the table name, i.e. Customers, but as Customer is&amp;#160; a more logical name I removed the training “s”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_2E6A6453.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="221" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_00A6DE52.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Next step is creating the ADO.NET Data Service to publish the entity model. Add another item to the project, this time choosing an ADO.NET Data Service and naming it Northwind.svc.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_565A3727.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="149" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_35909137.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;If we open the Northwind.svc.cs file we need to enter a few details before we can proceed. The first thing we need to enter is EDM class name we are going to expose. In this case that is the NorthwindEntities model. Next we need to allow callers to access the EDM. By default nothing is exposed to this is a crucial step that needs to be done in the InitializeService() function! In this case I am going to allow everything, maybe not the best solution in real live &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;/p&gt;  &lt;div&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, &amp;#39;Courier New&amp;#39;, 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; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; Northwind : DataService&amp;lt;NorthwindEntities&amp;gt;
{
    &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; InitializeService(IDataServiceConfiguration config)
    {
        config.SetEntitySetAccessRule(&lt;span style="color:#006080;"&gt;&amp;quot;*&amp;quot;&lt;/span&gt;, EntitySetRights.All);
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Testing our data service&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now we should be able to test our ADO.NET Data Service in the browser. Start the project and you should see the following in the browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_5541FBB0.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="132" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_729691D3.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Navigate to the following URL &lt;a title="http://localhost:4163/Northwind.svc/CustomerSet" href="http://localhost:4163/Northwind.svc/CustomerSet"&gt;http://localhost:4163/Northwind.svc/CustomerSet&lt;/a&gt; by adding CustomerSet and you should see the following customer data.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_443F9CD7.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="234" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_3AC8AD6B.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;If you see an RSS feed instead of the XML go into settings and disable the feed reading view. BTW the reason the customers data is showing up as an RSS feed is because the ADO.NET Data Services uses the ATOM feed format to transmit its data using a REST approach.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_6773F7F5.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="236" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_2BB6EFF3.png" width="244" border="0" /&gt;&lt;/a&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;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a Silverlight LOB client&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The next step is to create a Silverlight client application to consume and display the data. Add a new project the solution of type Silverlight Application and name it SilverlightClient.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_71CA3DB7.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="159" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_331F8315.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;When prompted just accept the defaults and add the Silverlight application to the existing SLDataService app. Next we need to add a service reference to the Northwind ADO.NET Data Service. Call it NorthwindService.&lt;/p&gt;

&lt;p&gt;Next we need to set up a bit of a user interface to display the list of customers. I kept this really simple and used a ListBox with a DataTemplate like this:&lt;/p&gt;

&lt;div&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, &amp;#39;Courier New&amp;#39;, 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;UserControl&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;x:Class&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;SilverlightClient.Page&amp;quot;&lt;/span&gt;
    &lt;span style="color:#ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt; 
    &lt;span style="color:#ff0000;"&gt;xmlns:x&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt; 
    &lt;span style="color:#ff0000;"&gt;Width&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;500&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Height&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;300&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;Grid&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;x:Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Background&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;White&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;ListBox&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;x:Name&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;lstCustomers&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;ListBox.ItemTemplate&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;DataTemplate&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;StackPanel&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Orientation&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;Horizontal&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;TextBlock&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{Binding CompanyName}&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Width&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;250&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;TextBlock&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{Binding City}&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Width&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;100&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;TextBlock&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;{Binding Country}&amp;quot;&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;Width&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;100&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;StackPanel&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;DataTemplate&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;ListBox.ItemTemplate&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;ListBox&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;Grid&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;UserControl&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The final step is to load the data from the service and bind this to the ListBox. To do that we need to create an DataServiceContext object of type NorthwindEntities. Unlike a regular service reference the DataServiceContext does not know its own URL by default and we need to be given the URL where the web service is located. Easy enough using the URL of the current page, loaded using HtmlPage.Document.DocumentUri, and the name of the service, Northwind.svc in this case.&lt;/p&gt;

&lt;div&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, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;Uri uri = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Uri(HtmlPage.Document.DocumentUri, &lt;span style="color:#006080;"&gt;&amp;quot;Northwind.svc&amp;quot;&lt;/span&gt;);
NorthwindEntities context = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; NorthwindEntities(uri);&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Using this context object we can do a LINQ query to load some data. Pretty standard stuff except that the asynchronous nature of Silverlight changes the actual loading of the data a bit. Normally you would expect to do something like:&lt;/p&gt;

&lt;div&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, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;var query = from cust &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; context.CustomerSet 
            select cust;

lstCustomers.ItemsSource = query.ToList();&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;In this case that won’t work and will only result in an System.NotSupportedException with the following message &amp;quot;Specified method is not supported.&amp;quot;.&lt;/p&gt;

&lt;p&gt;The correct way of doing this is by using a DataServiceQuery object which can load the data asynchronously as follows:&lt;/p&gt;

&lt;div&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, &amp;#39;Courier New&amp;#39;, courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;var query = from cust &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; context.CustomerSet 
            select cust;

var dsQuery = (DataServiceQuery&amp;lt;Customer&amp;gt;)query;
dsQuery.BeginExecute(
    result =&amp;gt; lstCustomers.ItemsSource = dsQuery.EndExecute(result), 
    &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;And the final result looks like this&lt;/p&gt;

&lt;p&gt;&lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_171154DB.png"&gt;&lt;img title="image" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" height="207" alt="image" src="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/image_5F00_thumb_5F00_329825E8.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Not bad at all &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;/p&gt;

&lt;p&gt;The complete code behind looks like this:&lt;/p&gt;

&lt;div&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, &amp;#39;Courier New&amp;#39;, 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; System.Data.Services.Client;
&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Linq;
&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Windows;
&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Windows.Browser;
&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Windows.Controls;
&lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; SilverlightClient.NorthwindService;

&lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; SilverlightClient
{
    &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; Page : UserControl
    {
        &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; Page()
        {
            InitializeComponent();
            Loaded += &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RoutedEventHandler(Page_Loaded);
        }

        &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Page_Loaded(&lt;span style="color:#0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)
        {
            Uri uri = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Uri(HtmlPage.Document.DocumentUri, &lt;span style="color:#006080;"&gt;&amp;quot;Northwind.svc&amp;quot;&lt;/span&gt;);
            NorthwindEntities context = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; NorthwindEntities(uri);
 
            var query = from cust &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; context.CustomerSet 
                        select cust;

            &lt;span style="color:#008000;"&gt;// This doesn&amp;#39;t work and will throw an System.NotSupportedException!&lt;/span&gt;
            &lt;span style="color:#008000;"&gt;// lstCustomers.ItemsSource = query.ToList();&lt;/span&gt;

            var dsQuery = (DataServiceQuery&amp;lt;Customer&amp;gt;)query;
            dsQuery.BeginExecute(
                result =&amp;gt; lstCustomers.ItemsSource = dsQuery.EndExecute(result), 
                &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;);
        }
    }
}&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:96fd2abe-8ce7-4f1c-803e-a7c695e4e2c9" style="padding-right:0px;display:inline;padding-left:0px;float:none;padding-bottom:0px;margin:0px;padding-top:0px;"&gt;&lt;p&gt;Visual Studio project &lt;a href="http://msmvps.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/theproblemsolver/SLDataService_5F00_0AF43A6F.zip" target="_blank"&gt;sampe code&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.theproblemsolver.nl/"&gt;www.TheProblemSolver.nl &lt;/a&gt;
  &lt;br /&gt;&lt;a href="http://wiki.windowsworkflowfoundation.eu/"&gt;Wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1658628" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Data+Access/default.aspx">Data Access</category></item><item><title>Updated SQL Server Compact Workflow Persistence Service</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/11/12/updated-sql-server-compact-workflow-persistence-service.aspx</link><pubDate>Wed, 12 Nov 2008 13:46:12 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1653882</guid><dc:creator>Maurice</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1653882</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/11/12/updated-sql-server-compact-workflow-persistence-service.aspx#comments</comments><description>&lt;p&gt;Yesterday I uploaded a new version of the SQL Server Compact Workflow Persistence Service to code.msdn.com. No major changes this time just two new features to get it more in line with the standard SqlWorkflowPersistenceService.&lt;/p&gt; &lt;ol&gt; &lt;li&gt;I added a GetAllWorkflows() function that returns all persisted workflow&amp;#39;s in the database.&lt;/li&gt; &lt;li&gt;I added a LoadExpiredTimerWorkflowIds() function that will return a list of workflow instanceId&amp;#39;s of all workflow&amp;#39;s with an expired timer.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Both new functions should help make the SqlCeWorkflowPersistenceService even more like the out of the box SqlWorkflowPersistenceService. And as before it is completely free &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;.&lt;/p&gt; &lt;p&gt;You can download the source code for the SqlCeWorkflowPersistenceService here: &lt;a title="http://code.msdn.microsoft.com/SqlCeWFPersistence" href="http://code.msdn.microsoft.com/SqlCeWFPersistence"&gt;http://code.msdn.microsoft.com/SqlCeWFPersistence&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;PS should you need to develop a custom WorkflowPersistenceService for some other database this would be a good starting point!&lt;/p&gt; &lt;p&gt;Enjoy.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.theproblemsolver.nl/"&gt;www.TheProblemSolver.nl &lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.windowsworkflowfoundation.eu/"&gt;Wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1653882" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>PDC session download</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/11/01/pdc-session-download.aspx</link><pubDate>Sat, 01 Nov 2008 10:17:52 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1652746</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1652746</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/11/01/pdc-session-download.aspx#comments</comments><description>&lt;p&gt;Want to download and watch all PDC content? Then there are a couple of ways to get at them. The official way if to go through the session agenda at the conference site. See &lt;a title="https://sessions.microsoftpdc.com/public/timeline.aspx" href="https://sessions.microsoftpdc.com/public/timeline.aspx"&gt;https://sessions.microsoftpdc.com/public/timeline.aspx&lt;/a&gt;. You see all sessions but it takes a bit of work. Another nice way is through Channel 9 by using the following feed: &lt;a title="http://channel9.msdn.com/posts/pdc2008/RSS/?tag=videos" href="http://channel9.msdn.com/posts/pdc2008/RSS/?tag=videos"&gt;http://channel9.msdn.com/posts/pdc2008/RSS/?tag=videos&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;But the best as far as I am concerned is using the list compiled by Greg Duncan. Check this list &lt;a title="http://coolthingoftheday.blogspot.com/2008/10/pdc2008-quick-video-link-list.html" href="http://coolthingoftheday.blogspot.com/2008/10/pdc2008-quick-video-link-list.html"&gt;http://coolthingoftheday.blogspot.com/2008/10/pdc2008-quick-video-link-list.html&lt;/a&gt;. And it even has the Visual Basic source code used to generate the list &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;/p&gt; &lt;p&gt;Enjoy the videos!&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.theproblemsolver.nl/"&gt;www.TheProblemSolver.nl &lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.windowsworkflowfoundation.eu/"&gt;Wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1652746" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/webcast/default.aspx">webcast</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/IronPython/default.aspx">IronPython</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/PDC/default.aspx">PDC</category></item><item><title>Red Gate to continue development of .NET Reflector</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/20/red-gate-to-continue-development-of-net-reflector.aspx</link><pubDate>Wed, 20 Aug 2008 07:04:54 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1645153</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1645153</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/20/red-gate-to-continue-development-of-net-reflector.aspx#comments</comments><description>&lt;p&gt;.NET Reflector, by Lutz Roeder, must be one of the most useful tools I have when developing .NET code. Usually it is the first thing I install right after Visual Studio not even waiting until I need it because I know I will.&lt;/p&gt; &lt;p&gt;So the big news is that Red Gate, makers of the Ants profiler and lots of other tools, are taking over from Lutz Roeder and will continue developing .NET Reflector. Interesting move and I hope this means a bright future for the .NET Reflector.&lt;/p&gt; &lt;p&gt;Read more about this &lt;a href="http://www.simple-talk.com/reflector/interview.htm"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.theproblemsolver.nl/"&gt;www.TheProblemSolver.nl &lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.windowsworkflowfoundation.eu/"&gt;Wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1645153" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>.NET Framework 3.5 Enhancements Training Kit</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/19/net-framework-3-5-enhancements-training-kit.aspx</link><pubDate>Tue, 19 Aug 2008 10:32:52 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1645044</guid><dc:creator>Maurice</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1645044</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/19/net-framework-3-5-enhancements-training-kit.aspx#comments</comments><description>&lt;p&gt;Want to know what is new in the .NET 3.5 SP1 framework or Visual Studio 2008 SP1? Then check out the presentations and labs here: &lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=355C80E9-FDE0-4812-98B5-8A03F5874E96&amp;amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=355C80E9-FDE0-4812-98B5-8A03F5874E96&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=355C80E9-FDE0-4812-98B5-8A03F5874E96&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;&amp;nbsp;&lt;/h2&gt; &lt;h2&gt;Overview&lt;/h2&gt; &lt;p&gt;The .NET Framework 3.5 Enhancements Training Kit includes presentations, hands-on labs, demos, and event materials. This content is designed to help you learn how to utilize the .NET 3.5 Enhancement features including: ASP.NET MVC, ASP.NET Dynamic Data, ASP.NET AJAX History, ASP.NET Routing, ADO.NET Data Services, ADO.NET Entity Framework, WCF 3.5 SP1, and the .NET Framework Client Profile.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Now this is nowhere near complete but a good place to start.&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1645044" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>Visual Studio 2008 Service Pack 1 available</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/11/visual-studio-2008-service-pack-1-available.aspx</link><pubDate>Mon, 11 Aug 2008 15:33:33 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1644248</guid><dc:creator>Maurice</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1644248</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/11/visual-studio-2008-service-pack-1-available.aspx#comments</comments><description>&lt;p&gt;It is available from the subscriptions download at &lt;a title="http://msdn.microsoft.com/en-us/subscriptions/default.aspx" href="http://msdn.microsoft.com/en-us/subscriptions/default.aspx"&gt;http://msdn.microsoft.com/en-us/subscriptions/default.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Get it while it is hot &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1644248" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>SQL Server Compact 3.5 SP1 released</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/07/sql-server-compact-3-5-sp1-released.aspx</link><pubDate>Thu, 07 Aug 2008 07:47:58 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1643674</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1643674</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/07/sql-server-compact-3-5-sp1-released.aspx#comments</comments><description>&lt;p&gt;Steve Lasker just announced that SQL Server Compact 3.5 service pack 1 is released, read his announcement &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/08/07/sql-server-compact-3-5-sp1-released.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;They added support for the entity framework, great stuff. And another neat feature is native 64 bits support. No longer do you need to target X86 and use WoW [:0]. Great if you are using my &lt;a href="http://code.msdn.microsoft.com/SqlCeWFPersistence"&gt;SQL Server Compact Workflow Persistence Service&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1643674" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>CodeCamp 2008</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/02/codecamp-2008.aspx</link><pubDate>Sat, 02 Aug 2008 08:39:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1643090</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1643090</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/08/02/codecamp-2008.aspx#comments</comments><description>&lt;p&gt;Afgelopen jaar hebben we het eerste CodeCamp in Nederland georganiseerd en dat was een groot succes. De meeste deelnemers vroegen om meer, sommige zelfs om een CodeCamp per kwartaal of een heel weekend lang. Nou hebben we dat laatste nog niet gedaan maar we zijn wel aan de slag gegaan om een nieuw CodeCamp te organiseren. Als datum hebben we zaterdag 6 september gekozen. Gelukkig waren &lt;a href="http://www.microsoft.nl/"&gt;Microsoft&lt;/a&gt; en &lt;a href="http://www.class-a.nl/"&gt;Class-a&lt;/a&gt; behulpzaam en kunnen we, net als vorig jaar, weer in het Microsoft Innovation Center in Barneveld terecht. Een mooie datum en locatie om uitgerust van de vakantie een hoop kennis uit te wisselen. &lt;p&gt;Het programma staat nog niet helemaal vast, hou daar de website voor in de gaten, maar je kan er ondermeer de bekende Nederlandse sprekers verwachten. Uiteraard kan je zelf ook nog een sessie voorstellen dus als je een idee hebt voor een leuke sessie laat het dan zo snel mogelijk weten. &lt;p&gt;&amp;nbsp; &lt;p&gt;Dus zet de datum vast in je agenda en meld je zo snel mogelijk aan op de website &lt;a href="http://www.code-camp.nl"&gt;www.code-camp.nl&lt;/a&gt;. &lt;p&gt;&amp;nbsp; &lt;p&gt;Het &lt;a href="http://www.code-camp.nl/"&gt;CodeCamp&lt;/a&gt; is een gezamenlijk initiatief van de &lt;a href="http://www.sdn.nl/"&gt;SDN&lt;/a&gt;, de stichting &lt;a href="http://www.dotned.nl/"&gt;DotNed&lt;/a&gt; en &lt;a href="http://www.vbcentral.nl/"&gt;VB Central&lt;/a&gt;. &lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1643090" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>Lambda expression simplify code</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/05/26/lambda-expression-simplify-code.aspx</link><pubDate>Mon, 26 May 2008 08:54:39 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1627422</guid><dc:creator>Maurice</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1627422</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/05/26/lambda-expression-simplify-code.aspx#comments</comments><description>&lt;p&gt;One of the nice new features in Visual Basic 9 are lambda expressions. They where actually added as one of the underlying pieces for LINQ. But besides enabling LINQ you can use them in all sorts of places. One of the places they really help me is in places where I previously needed to declare a delegate and use that.&lt;/p&gt; &lt;p&gt;Take for example the following code where I use the ThreadPool to do some work:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;Private Sub &lt;/span&gt;btnStart_Click() &lt;span style="color:blue;"&gt;Handles &lt;/span&gt;btnStart.Click
    ThreadPool.QueueUserWorkItem(&lt;span style="color:blue;"&gt;AddressOf &lt;/span&gt;DoWork)
&lt;span style="color:blue;"&gt;End Sub

Private Sub &lt;/span&gt;DoWork(&lt;span style="color:blue;"&gt;ByVal &lt;/span&gt;state &lt;span style="color:blue;"&gt;As Object&lt;/span&gt;)

    &lt;span style="color:blue;"&gt;For &lt;/span&gt;index &lt;span style="color:blue;"&gt;As Integer &lt;/span&gt;= 1 &lt;span style="color:blue;"&gt;To &lt;/span&gt;100
        SetProgressLabel(index)
        Thread.Sleep(100)
    &lt;span style="color:blue;"&gt;Next
End Sub
&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The SetProgressLabel function reports the progress to the user by setting the text on a label. As the work is done in a background thread I need to use Invoke to set the text property.&lt;/p&gt;
&lt;p&gt;Before VB9 I would have to implement the SetProgressLabel like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;Delegate Sub &lt;/span&gt;SetProgressLabelDelegate(&lt;span style="color:blue;"&gt;ByVal &lt;/span&gt;percentage &lt;span style="color:blue;"&gt;As Integer&lt;/span&gt;)
&lt;span style="color:blue;"&gt;Private Sub &lt;/span&gt;SetProgressLabel(&lt;span style="color:blue;"&gt;ByVal &lt;/span&gt;percentage &lt;span style="color:blue;"&gt;As Integer&lt;/span&gt;)
    &lt;span style="color:blue;"&gt;If &lt;/span&gt;lblStatus.InvokeRequired &lt;span style="color:blue;"&gt;Then
        &lt;/span&gt;lblStatus.Invoke( _
            &lt;span style="color:blue;"&gt;New &lt;/span&gt;SetProgressLabelDelegate( _
                &lt;span style="color:blue;"&gt;AddressOf &lt;/span&gt;SetProgressLabel), _
                percentage)
    &lt;span style="color:blue;"&gt;Else
        &lt;/span&gt;lblStatus.Text = percentage.ToString() + &lt;span style="color:#a31515;"&gt;&amp;quot; %&amp;quot;
    &lt;/span&gt;&lt;span style="color:blue;"&gt;End If
End Sub
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;First I would need to declare a delegate with the right signature, create an object passing in the address of the function to call and the parameters. Even though I declared the delegate with its parameters the Invoke is not aware of these and I can add make errors with the parameters which don&amp;#39;t show until runtime.&lt;/p&gt;
&lt;p&gt;So here is a better way to do this in VB9:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;Private Function &lt;/span&gt;SetProgressLabel(&lt;span style="color:blue;"&gt;ByVal &lt;/span&gt;percentage &lt;span style="color:blue;"&gt;As Integer&lt;/span&gt;) &lt;span style="color:blue;"&gt;As Object
    If &lt;/span&gt;lblStatus.InvokeRequired &lt;span style="color:blue;"&gt;Then
        &lt;/span&gt;lblStatus.Invoke(&lt;span style="color:blue;"&gt;Function&lt;/span&gt;() SetProgressLabel(percentage))
    &lt;span style="color:blue;"&gt;Else
        &lt;/span&gt;lblStatus.Text = percentage.ToString() + &lt;span style="color:#a31515;"&gt;&amp;quot; %&amp;quot;
    &lt;/span&gt;&lt;span style="color:blue;"&gt;End If
    Return Nothing
End Function
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;This time I use an lambda expression to call the SetProgressLabel function. No need for the extra delegate and I get full compile time checking &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;. In fact the only drawback is that I need to declare SetProgressLabel as a function instead of a sub as VB forces a lambda expression to return a value. This makes working with lambda expressions somewhat less powerful than the C# implementation &lt;img src="http://msmvps.com/emoticons/emotion-6.gif" alt="Sad" /&gt; Lets just hope that problem is rectified soon.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/theproblemsolver/WindowsLiveWriter/Lambdaexpressionsimplifycode_98DF/image_2.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="182" alt="image" src="http://msmvps.com/blogs/theproblemsolver/WindowsLiveWriter/Lambdaexpressionsimplifycode_98DF/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;One neat thing is that you don&amp;#39;t actually need to target the 3.5 framework to use lambda expressions. The previous sample works just fine targeting the .NET 2.0 runtime as long as VB9 is used. The reason for this is that the lambda expression syntax is actually just a compiler trick and it creates an delegate for us behind the scenes. Pretty cool!&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;a href="http://www.TheProblemSolver.nl"&gt;www.TheProblemSolver.nl&lt;/a&gt; &lt;br /&gt;&lt;a href="http://wiki.WindowsWorkflowFoundation.eu"&gt;http://wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1627422" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category></item><item><title>SQL Server Compact and 64 bits</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/05/20/sql-server-compact-and-64-bits.aspx</link><pubDate>Tue, 20 May 2008 10:32:18 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1624872</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1624872</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/05/20/sql-server-compact-and-64-bits.aspx#comments</comments><description>&lt;p&gt;The current version of SQL Server Compact has no support for 64 bits computing. While this may seem a problem if you want to deploy you application on a 64 bits version of Windows it really isn&amp;#39;t most of the time. In fact if you change your assembly from the default AnyCPU to x86 compatible it will work just fine using Windows On Windows (WOW).&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/blogs/theproblemsolver/WindowsLiveWriter/SQLServerCompactand64bits_B054/image_2.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="182" alt="image" src="http://msmvps.com/blogs/theproblemsolver/WindowsLiveWriter/SQLServerCompactand64bits_B054/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;But even better there will soon be a native 64bits version of SQL Compact. This isn&amp;#39;t in the beta version that is distibrited with Visual Studio 2008 SP1 beta but Steve Lasker promises it will be in the final version when that releases.&lt;/p&gt; &lt;p&gt;Another nice feature that will be added is support for LINQ to Entities. And that includes the designer support we now lack with LINQ to SQL.&lt;/p&gt; &lt;p&gt;More info about the change can be found in &lt;a href="http://blogs.msdn.com/stevelasker/archive/2008/05/14/sql-server-compact-3-5-sp1-beta-available.aspx"&gt;this&lt;/a&gt; blog post by Steve Lasker.&lt;/p&gt; &lt;p&gt;Enjoy!&lt;/p&gt; &lt;p&gt; &lt;p&gt;&lt;a href="http://www.TheProblemSolver.nl"&gt;www.TheProblemSolver.nl&lt;/a&gt; &lt;br /&gt;&lt;a href="http://wiki.WindowsWorkflowFoundation.eu"&gt;http://wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1624872" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>How to Download all of Visual Studio 2008 SP1</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/05/16/how-to-download-all-of-visual-studio-2008-sp1.aspx</link><pubDate>Fri, 16 May 2008 09:05:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1623282</guid><dc:creator>Maurice</dc:creator><slash:comments>14</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1623282</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/05/16/how-to-download-all-of-visual-studio-2008-sp1.aspx#comments</comments><description>&lt;p&gt;&amp;nbsp;VS2008 SP1 Beta is quite a package. By default the installation downloads the packages as needed and when needed. Now that is just fine if you only need to install a single machine. But when you need to install multiple, possibly virtual, machines like I have to it just wastes a lot of bandwidth and time &lt;img src="http://msmvps.com/emoticons/emotion-6.gif" alt="Sad" /&gt;. Fortunately there is a solution and it can be found &lt;a href="http://blogs.msdn.com/heaths/archive/2008/05/14/how-to-download-all-of-visual-studio-2008-sp1.aspx"&gt;here&lt;/a&gt; in the blog post by Heath Stewart.&lt;/p&gt;&lt;p&gt;Enjoy!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1623282" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VSTO/default.aspx">VSTO</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>Workflow Persistence Service using SQL Server Compact</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/04/10/workflow-persistence-service-using-sql-server-compact.aspx</link><pubDate>Thu, 10 Apr 2008 18:11:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1581506</guid><dc:creator>Maurice</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1581506</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/04/10/workflow-persistence-service-using-sql-server-compact.aspx#comments</comments><description>&lt;p&gt;As I mentioned previously I was working in a Workflow Persistence Service using SQL Server Compact as the back end store. Now this might not be the best persistence store to use in every application but it has a number of advantages. &lt;/p&gt; &lt;p&gt;One of the main advantages is ClickOnce deployment. In the case of the standard SqlWorkflowPersistenceService you need to have SQL Server installed and running and create the database, with a name of your choosing, using two scripts. Not a big problem but something that needs to be done first and is outside of the realm of what you would like to do with ClickOnce. Not so with SQL Server Compact. No with SqlCe you can just deploy a number of DLL&amp;#39;s with your application and you are ready to go, so much easier and very ClickOnce compatible &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt; Add easy installation is just what you want when you are creating sample applications.&lt;/p&gt; &lt;p&gt;I actually did all the data access using LINQ to SQL which fully supports SqlCe as a client. It might appear not to as there is no designer support like with SQL Server itself but runtime it works just fine &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;. using LINQ to SQL actually made the data access very easy and has an additional benefit, if you want to use the full SQL Server all you need to do is provide a different database connections string. One additional benefit of using LINQ to SQL was that is can check if the database exists and, if not, create it with a single function call. No need to mess with those tedious Create Table statements in SQL scripts!&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;Imports &lt;/span&gt;TheProblemSolver.Workflow.Hosting.Persistence

&lt;span style="color:blue;"&gt;Module &lt;/span&gt;Module1
    &lt;span style="color:blue;"&gt;Class &lt;/span&gt;Program
        &lt;span style="color:blue;"&gt;Shared Sub &lt;/span&gt;Main()
            &lt;span style="color:blue;"&gt;Using &lt;/span&gt;workflowRuntime &lt;span style="color:blue;"&gt;As New &lt;/span&gt;WorkflowRuntime()

                &lt;span style="color:blue;"&gt;Dim &lt;/span&gt;connectionStr &lt;span style="color:blue;"&gt;As String &lt;/span&gt;= &lt;span style="color:#a31515;"&gt;&amp;quot;Data Source=WorkflowPersistenceDatabase.sdf&amp;quot;
                &lt;/span&gt;&lt;span style="color:blue;"&gt;Dim &lt;/span&gt;unloadOnIdle &lt;span style="color:blue;"&gt;As Boolean &lt;/span&gt;= &lt;span style="color:blue;"&gt;True
                Dim &lt;/span&gt;loadingInterval &lt;span style="color:blue;"&gt;As &lt;/span&gt;TimeSpan = TimeSpan.FromSeconds(15)
                &lt;span style="color:blue;"&gt;Dim &lt;/span&gt;persistence &lt;span style="color:blue;"&gt;As New &lt;/span&gt;SqlCeWorkflowPersistenceService(connectionStr, _
                                                                       unloadOnIdle, _
                                                                       loadingInterval)
                workflowRuntime.AddService(persistence)

                &lt;span style="color:blue;"&gt;Dim &lt;/span&gt;workflowInstance &lt;span style="color:blue;"&gt;As &lt;/span&gt;WorkflowInstance
                workflowInstance = workflowRuntime.CreateWorkflow(&lt;span style="color:blue;"&gt;GetType&lt;/span&gt;(Workflow1))
                workflowInstance.Start()

                Console.WriteLine(&lt;span style="color:#a31515;"&gt;&amp;quot;Press enter to stop...&amp;quot;&lt;/span&gt;)
                Console.ReadLine()
            &lt;span style="color:blue;"&gt;End Using
        End Sub
    End Class
End Module

&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Usage is real simple and pretty much the same as the standard SqlWorkflowPersistenceService type. The only extra is to set a reference to the TheProblemSolver.Workflow.Hosting.Persistence.dll that includes the SqlCeWorkflowPersistenceService type.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System;
&lt;span style="color:blue;"&gt;using &lt;/span&gt;System.Workflow.Runtime;
&lt;span style="color:blue;"&gt;using &lt;/span&gt;TheProblemSolver.Workflow.Hosting.Persistence;

&lt;span style="color:blue;"&gt;namespace &lt;/span&gt;TestClient
{
    &lt;span style="color:blue;"&gt;class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Program
    &lt;/span&gt;{
        &lt;span style="color:blue;"&gt;static void &lt;/span&gt;Main(&lt;span style="color:blue;"&gt;string&lt;/span&gt;[] args)
        {
            &lt;span style="color:blue;"&gt;using &lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;WorkflowRuntime &lt;/span&gt;workflowRuntime = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;WorkflowRuntime&lt;/span&gt;())
            {
                &lt;span style="color:blue;"&gt;string &lt;/span&gt;connectionStr = &lt;span style="color:#a31515;"&gt;@&amp;quot;Data Source=WorkflowPersistenceDatabase.sdf&amp;quot;&lt;/span&gt;;
                &lt;span style="color:blue;"&gt;bool &lt;/span&gt;unloadOnIdle = &lt;span style="color:blue;"&gt;true&lt;/span&gt;;
                &lt;span style="color:#2b91af;"&gt;TimeSpan &lt;/span&gt;loadingInterval = &lt;span style="color:#2b91af;"&gt;TimeSpan&lt;/span&gt;.FromSeconds(15);
                &lt;span style="color:#2b91af;"&gt;SqlCeWorkflowPersistenceService &lt;/span&gt;persistence = 
                    &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;SqlCeWorkflowPersistenceService&lt;/span&gt;(connectionStr, unloadOnIdle, loadingInterval);
                workflowRuntime.AddService(persistence);

                &lt;span style="color:#2b91af;"&gt;WorkflowInstance &lt;/span&gt;instance = workflowRuntime.CreateWorkflow(&lt;span style="color:blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color:#2b91af;"&gt;Workflow1&lt;/span&gt;));
                instance.Start();

                &lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color:#a31515;"&gt;&amp;quot;Press enter to stop...&amp;quot;&lt;/span&gt;);
                &lt;span style="color:#2b91af;"&gt;Console&lt;/span&gt;.ReadLine();
            }
        }
    }
}
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;If you want to download the SqlCeWorkflowPersistenceService you can find it &lt;a href="http://code.msdn.microsoft.com/SqlCeWFPersistence"&gt;here&lt;/a&gt;. Any feedback, hopefully good, will be appreciated!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Enjoy! 
&lt;p&gt;&lt;a href="http://www.TheProblemSolver.nl"&gt;www.TheProblemSolver.nl&lt;/a&gt; &lt;br /&gt;&lt;a href="http://wiki.WindowsWorkflowFoundation.eu"&gt;http://wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1581506" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/ClickOnce/default.aspx">ClickOnce</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WPF/default.aspx">WPF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/SqlCe/default.aspx">SqlCe</category></item><item><title>LINQ to SQL, SQL Compact and the |DataDirectory| macro</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/04/09/linq-to-sql-sql-compact-and-the-datadirectory-macro.aspx</link><pubDate>Wed, 09 Apr 2008 12:27:47 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1579403</guid><dc:creator>Maurice</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1579403</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/04/09/linq-to-sql-sql-compact-and-the-datadirectory-macro.aspx#comments</comments><description>&lt;p&gt;As I &lt;a href="http://msmvps.com/blogs/theproblemsolver/archive/2008/04/09/linq-to-sql-and-creating-databases.aspx"&gt;previously mentioned&lt;/a&gt; having the LINQ DataContext create the database if it doesn&amp;#39;t exist yet is a cool feature but it isn&amp;#39;t perfect.&lt;/p&gt; &lt;p&gt;The problem I just ran into was while using the |DataDirectory| macro, something the SqlCeConnection understands and will replace with the directory specified. Well it turns out the LINQ DataContext isn&amp;#39;t that smart when checking if the database exists. Apparently it checks if the database file exists without expanding the |DataDirectory| so it never finds the database. The result is a SqlCeException with the message: &amp;quot;File already exists. Try using a different database name. [ File name = C:\Projects\ConsoleApplication1\ConsoleApplication1\bin\Debug\Data2.sdf ]&amp;quot;&lt;/p&gt; &lt;p&gt;Actually creating the database the first time works just fine and all other actions like querying or updating are fine to.&lt;/p&gt; &lt;p&gt;To reproduce the error create a console app and add a LINQ to SQL DBML file. Just add a small class with a property to server as table.&lt;/p&gt; &lt;p&gt;&lt;a href="http://msmvps.com/blogs/theproblemsolver/WindowsLiveWriter/LINQtoSQLSQLCompactandtheDataDirectoryma_AD4B/image_2.png"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="180" alt="image" src="http://msmvps.com/blogs/theproblemsolver/WindowsLiveWriter/LINQtoSQLSQLCompactandtheDataDirectoryma_AD4B/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Add the following code:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;Module &lt;/span&gt;Module1
    &lt;span style="color:blue;"&gt;Sub &lt;/span&gt;Main()
        &lt;span style="color:blue;"&gt;Try
            &lt;/span&gt;&lt;span style="color:green;"&gt;&amp;#39; Cleanup any previous files
            &lt;/span&gt;&lt;span style="color:blue;"&gt;My&lt;/span&gt;.Computer.FileSystem.DeleteFile(&lt;span style="color:#a31515;"&gt;&amp;quot;Data1.sdf&amp;quot;&lt;/span&gt;)
            &lt;span style="color:blue;"&gt;My&lt;/span&gt;.Computer.FileSystem.DeleteFile(&lt;span style="color:#a31515;"&gt;&amp;quot;Data2.sdf&amp;quot;&lt;/span&gt;)
        &lt;span style="color:blue;"&gt;Catch &lt;/span&gt;ex &lt;span style="color:blue;"&gt;As &lt;/span&gt;Exception
        &lt;span style="color:blue;"&gt;End Try

        For &lt;/span&gt;i &lt;span style="color:blue;"&gt;As Integer &lt;/span&gt;= 1 &lt;span style="color:blue;"&gt;To &lt;/span&gt;2
            CreateDatabaseIfNeeded(&lt;span style="color:#a31515;"&gt;&amp;quot;Data Source=Data1.sdf&amp;quot;&lt;/span&gt;)
            CreateDatabaseIfNeeded(&lt;span style="color:#a31515;"&gt;&amp;quot;Data Source=|DataDirectory|\Data2.sdf&amp;quot;&lt;/span&gt;)
        &lt;span style="color:blue;"&gt;Next
    End Sub

    Sub &lt;/span&gt;CreateDatabaseIfNeeded(&lt;span style="color:blue;"&gt;ByVal &lt;/span&gt;connection &lt;span style="color:blue;"&gt;As String&lt;/span&gt;)
        &lt;span style="color:blue;"&gt;Dim &lt;/span&gt;context &lt;span style="color:blue;"&gt;As New &lt;/span&gt;DataClasses1DataContext(connection)
        &lt;span style="color:blue;"&gt;If Not &lt;/span&gt;context.DatabaseExists() &lt;span style="color:blue;"&gt;Then
            &lt;/span&gt;Console.WriteLine(&lt;span style="color:#a31515;"&gt;&amp;quot;Creating database&amp;quot;&lt;/span&gt;)
            context.CreateDatabase()
        &lt;span style="color:blue;"&gt;Else
            &lt;/span&gt;Console.WriteLine(&lt;span style="color:#a31515;"&gt;&amp;quot;Database exists&amp;quot;&lt;/span&gt;)
        &lt;span style="color:blue;"&gt;End If
    End Sub
End Module
&lt;/span&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;And run the application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Want to see this fixed? The vote for it &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=337452"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Enjoy! 
&lt;p&gt;&lt;a href="http://www.TheProblemSolver.nl"&gt;www.TheProblemSolver.nl&lt;/a&gt; &lt;br /&gt;&lt;a href="http://wiki.WindowsWorkflowFoundation.eu"&gt;http://wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1579403" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category></item><item><title>LINQ to SQL and creating databases</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/04/09/linq-to-sql-and-creating-databases.aspx</link><pubDate>Wed, 09 Apr 2008 10:19:06 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1579232</guid><dc:creator>Maurice</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1579232</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/04/09/linq-to-sql-and-creating-databases.aspx#comments</comments><description>&lt;p&gt;LINQ to SQL has a really nice feature when making sample and demos in the ability to create the database if it doesn&amp;#39;t exist yet. It also has a function called DatabaseExists() to check if a database exists. Both are defined on the DataContext class.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;string &lt;/span&gt;connectionString 
    = &lt;span style="color:#a31515;"&gt;@&amp;quot;Data Source=.\sqlexpress;Initial Catalog=MyNewDatabase;Integrated Security=True&amp;quot;&lt;/span&gt;;

&lt;span style="color:#2b91af;"&gt;MyNewDatabase &lt;/span&gt;context = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;MyNewDatabase&lt;/span&gt;(connectionString);
&lt;span style="color:blue;"&gt;if &lt;/span&gt;(!context.DatabaseExists())
    context.CreateDatabase();
&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;And best of all they work both for SQL Server and for SQL Compact so it is real easy to make demo&amp;#39;s that work with both the full SQL Server as well as the lightweight SQL Compact. All you need to do is change the connection string.&lt;/p&gt;&lt;pre class="code"&gt;connectionString = &lt;span style="color:#a31515;"&gt;@&amp;quot;Data Source=MyNewDatabase.sdf&amp;quot;&lt;/span&gt;;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;Now I specially like the SQL Compact option for samples as there is no installation requirement, just copy the files and you are good to go &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;. In fact I have been using LINQ to SQL to create a SQL Compact Workflow persistence service but because of the very nature of LINQ to SQL I can use it just as well with the full blown SQL Server as SQL Compact.&lt;/p&gt;
&lt;p&gt;So why do I consider the DatabaseExists() function only suitable for demo&amp;#39;s? Well in the case of SQL Server it makes a connection to the server and sees if it can use the database. Hardly a very reliable check as it can fail for any number of reasons. And if the database exists it still doesn&amp;#39;t mean that the schema is correct. For SQL Compact the check is even worse, it only checks if a file with the same name exists, no matter what it is.&lt;/p&gt;
&lt;p&gt;Enjoy! 
&lt;p&gt;&lt;a href="http://www.TheProblemSolver.nl"&gt;www.TheProblemSolver.nl&lt;/a&gt; &lt;br /&gt;&lt;a href="http://wiki.WindowsWorkflowFoundation.eu"&gt;http://wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1579232" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category></item><item><title>On the WF ReceiveActivity and WCF bindings</title><link>http://msmvps.com/blogs/theproblemsolver/archive/2008/03/26/on-the-wf-receiveactivity-and-wcf-bindings.aspx</link><pubDate>Wed, 26 Mar 2008 16:46:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1554907</guid><dc:creator>Maurice</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/theproblemsolver/rsscomments.aspx?PostID=1554907</wfw:commentRss><comments>http://msmvps.com/blogs/theproblemsolver/archive/2008/03/26/on-the-wf-receiveactivity-and-wcf-bindings.aspx#comments</comments><description>&lt;p&gt;The new ReceiveActivity and SendActivity that marry Windows Workflow Foundation (WF) and Windows Communication Foundation (WCF) are really cool &lt;img src="http://msmvps.com/emoticons/emotion-1.gif" alt="Smile" /&gt;.  Getting started is easy because a new Sequential Workflow Service Library, found under WCF instead of Workflow in VS2008, uses nice defaults for everything. But sooner or later you need to change these defaults and you need to know what can be done and what can&amp;#39;t.
&lt;/p&gt;&lt;p&gt;When you want to use the new ReceiveActivity in a workflow you need to use a compatible WCF binding.  The reason for this requirement is that the conversation context, see &lt;a href="http://msmvps.com/blogs/theproblemsolver/archive/2008/03/24/receiveactivity-contexttokens-and-conversations.aspx"&gt;this blog post&lt;/a&gt;, is part of the message and needs to be retrieved and returned. The following code returns a list of all WCF binding and how they are composed:
&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;Sub&lt;/span&gt; Main()
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; assemblies &lt;span style="color:blue;"&gt;As&lt;/span&gt;
			&lt;span style="color:blue;"&gt;New&lt;/span&gt; List(&lt;span style="color:blue;"&gt;Of&lt;/span&gt; Assembly)()
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:green;"&gt;&amp;#39; .NET 3.0
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;    assemblies.Add(&lt;span style="color:blue;"&gt;GetType&lt;/span&gt;(ServiceHost).Assembly)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:green;"&gt;&amp;#39; .NET 3.5
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;    assemblies.Add(&lt;span style="color:blue;"&gt;GetType&lt;/span&gt;(WorkflowServiceHost).Assembly)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;    assemblies.Add(&lt;span style="color:blue;"&gt;GetType&lt;/span&gt;(WebServiceHost).Assembly)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; query = &lt;span style="color:blue;"&gt;From&lt;/span&gt; assembly &lt;span style="color:blue;"&gt;In&lt;/span&gt; assemblies _
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;From&lt;/span&gt; type &lt;span style="color:blue;"&gt;In&lt;/span&gt; assembly.GetTypes() _
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Where&lt;/span&gt; type.IsSubclassOf(&lt;span style="color:blue;"&gt;GetType&lt;/span&gt;(Binding)) _
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;AndAlso&lt;/span&gt;
			&lt;span style="color:blue;"&gt;Not&lt;/span&gt; type.IsAbstract _
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;AndAlso&lt;/span&gt; type.IsPublic _
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Order&lt;/span&gt;
			&lt;span style="color:blue;"&gt;By&lt;/span&gt; type.Name _
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Select&lt;/span&gt; type
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;    PrintBinding(query.ToList)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;    Console.ReadLine()
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt;
			&lt;span style="color:blue;"&gt;Sub
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;Private&lt;/span&gt;
			&lt;span style="color:blue;"&gt;Sub&lt;/span&gt; PrintBinding(&lt;span style="color:blue;"&gt;ByVal&lt;/span&gt; types &lt;span style="color:blue;"&gt;As&lt;/span&gt; List(&lt;span style="color:blue;"&gt;Of&lt;/span&gt; Type))
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;For&lt;/span&gt;
			&lt;span style="color:blue;"&gt;Each&lt;/span&gt; type &lt;span style="color:blue;"&gt;In&lt;/span&gt; types
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;        Console.WriteLine(type.FullName)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Try
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; binding &lt;span style="color:blue;"&gt;As&lt;/span&gt; Binding = _
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;CType&lt;/span&gt;(Activator.CreateInstance(type), Binding)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Dim&lt;/span&gt; elements = binding.CreateBindingElements
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;For&lt;/span&gt;
			&lt;span style="color:blue;"&gt;Each&lt;/span&gt; element &lt;span style="color:blue;"&gt;In&lt;/span&gt; elements
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;                Console.WriteLine(vbTab + element.GetType().FullName)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Next
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Catch&lt;/span&gt; ex &lt;span style="color:blue;"&gt;As&lt;/span&gt; Exception
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;            Console.WriteLine(ex.Message)
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;End&lt;/span&gt;
			&lt;span style="color:blue;"&gt;Try
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;        Console.WriteLine()
&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;
			&lt;span style="color:blue;"&gt;Next
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Courier New;font-size:10pt;"&gt;&lt;span style="color:blue;"&gt;End&lt;/span&gt;
			&lt;span style="color:blue;"&gt;Sub
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;The classes responsible for inserting and removing these conversation tokens are ContextRequestChannel and ContextReplyChannel and they are instantiated by the ContextBindingElement. So seems we are restricted to using BasicHttpContextBinding, NetTcpContextBinding or WSHttpContextBinding. 
&lt;/p&gt;&lt;p&gt;So it seems we cannot use NetMsmqBinding which is a shame because one way reliable messaging is the perfect fit for workflow as far as I am concerned. Well not quite so fast because we still have the CustomBinding where we can configure the stack just the way we want right?
&lt;/p&gt;&lt;p&gt;Yeah we do but there is a problem &lt;img src="http://msmvps.com/emoticons/emotion-6.gif" alt="Sad" /&gt;. It turns out the ContextBinding requires a channel with an IReplyChannel interface and the NetMsmqBinding   actually implement an IInputChannel or an IOutputChannel. Which one actually depends if you are the client or the service.
&lt;/p&gt;&lt;p&gt;And thinking about how WF/WCF conversations works this restriction makes sense. After all a ReceiveActivity is called without a context in order to create a new workflow, assuming the CanCreateInstance property equals true, and returns the workflow instanceId in the context as part of the response. This design kind of rules out one-way messages and thereby NetMsmqBinding.
&lt;/p&gt;&lt;p&gt;Now this sucks big time if you ask me &lt;img src="http://msmvps.com/emoticons/emotion-6.gif" alt="Sad" /&gt;. I would much rather have seen that you could specify the instanceId of the workflow to be created, just as you can with the WorkflowRuntime.CreateWorkflow() where a number of the overloads let you specify the workflows instanceId. I suppose it is possible to create a different context binding but that would be quite some work and, I assume, duplicate a lot of code already written my Microsoft. So let&amp;#39;s hope they see the light and add MSMQ/ReceiveActivity intergration.
&lt;/p&gt;&lt;p&gt;
 &lt;/p&gt;&lt;p&gt;Enjoy!
&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.TheProblemSolver.nl"&gt;www.TheProblemSolver.nl&lt;/a&gt;&lt;br /&gt;&lt;a href="http://wiki.WindowsWorkflowFoundation.eu"&gt;http://wiki.WindowsWorkflowFoundation.eu&lt;/a&gt;
	&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1554907" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/.NET/default.aspx">.NET</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/LINQ/default.aspx">LINQ</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/NetFx3/default.aspx">NetFx3</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/Workflow/default.aspx">Workflow</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/WCF/default.aspx">WCF</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/VB/default.aspx">VB</category><category domain="http://msmvps.com/blogs/theproblemsolver/archive/tags/DevCenter/default.aspx">DevCenter</category></item></channel></rss>