<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>Beth Massi - Sharing the goodness</title><link>http://blogs.msdn.com/b/bethmassi/</link><description>Community champion for business application and Visual Basic developers</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>LightSwitch Tips &amp; Tricks on Query Performance</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/05/29/lightswitch-tips-amp-tricks-on-query-performance.aspx</link><pubDate>Tue, 29 May 2012 14:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10310608</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10310608</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/05/29/lightswitch-tips-amp-tricks-on-query-performance.aspx#comments</comments><description>&lt;p&gt;LightSwitch allows you to connect to multiple data sources, relate them together, and create screens to edit the data. These data sources can be a variety of databases like SQL Server and SQL Azure, SharePoint, and custom RIA services. With the release of &lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank"&gt;Visual Studio 11 Beta&lt;/a&gt;, the next version of LightSwitch also allows you to connect data services via OData which are often hosted remotely. When the size of the data in these data sources get too large, or the distance between them increases (i.e. Internet based data services), performance decreases. Contributing factors are the size of the data set coming down the wire is too big, the number of fields to search on in the table is high, or the size of the data in the tables has grown very large.&lt;/p&gt;  &lt;p&gt;As the size of data grows and/or the length of the “wire” increases, it’s important to understand the affects these have on query performance. In this post I’d like to discuss some important considerations to make when designing your entities and queries in LightSwitch against large or remote data sets.&lt;/p&gt;  &lt;h3&gt;Default Searching Behavior&lt;/h3&gt;  &lt;p&gt;When you design your entities in LightSwitch, by default all string properties are searchable. This means that when displaying data in grids or lists, the search box will execute a query that compares all the string fields in the table for a possible match. For example, say I have a table of customers coming from the &lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/55330" target="_blank"&gt;AdventureWorksLT database&lt;/a&gt;. If I search for “Adam” then all records with any mention of the word “adam” in any of its string fields are displayed. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5557.image_5F00_32CBB59C.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3007.image_5F00_thumb_5F00_0B253972.png" width="797" height="217" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are 10 string fields in this table so the WHERE clause on the database query is:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;WHERE ([LastName] LIKE N'%Adam%') OR ([FirstName] LIKE N'%Adam%') OR ([MiddleName] LIKE N'%Adam%') OR ([Title] LIKE N'%Adam%') OR ([Suffix] LIKE N'%Adam%') OR ([CompanyName] LIKE N'%Adam%') OR ([SalesPerson] LIKE N'%Adam%') OR ([EmailAddress] LIKE N'%Adam%') OR ([Phone] LIKE N'%Adam%') OR ([PasswordHash] LIKE '%Adam%') OR ([PasswordSalt] LIKE '%Adam%')&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Similarly, when connecting to OData sources with LightSwitch in Visual Studio 11, you can see the query over HTTP to the remote data service. For instance, in the following example I have a search screen for movie &amp;amp; music titles coming from the &lt;a href="http://odata.netflix.com/v2/Catalog/" target="_blank"&gt;Netflix OData service&lt;/a&gt;, sorted by name. Notice if I search for “Star Wars” that all records with any mention of the phrase “Star Wars” in any of its string fields are displayed. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0842.image_5F00_71BD3637.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5076.image_5F00_thumb_5F00_662778F8.png" width="794" height="512" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here’s the request sent to the OData service. (For more information on the query syntax see the &lt;a href="http://www.odata.org/documentation/uri-conventions" target="_blank"&gt;URI conventions supported in OData queries&lt;/a&gt;.)&lt;/p&gt; &lt;font size="2" face="Courier New"&gt;GET &lt;/font&gt;&lt;a href="http://odata.netflix.com/v2/Catalog/Titles()?"&gt;&lt;font size="2" face="Courier New"&gt;http://odata.netflix.com/v2/Catalog/Titles()?&lt;/font&gt;&lt;/a&gt;&lt;font size="2" face="Courier New"&gt;$orderby=Name&amp;amp;$filter=substringof('Star%20Wars',Id)%20or%20substringof('Star%20Wars',Name)%20or%20(substringof('Star%20Wars',ShortName)%20or%20substringof('Star%20Wars',Synopsis))%20or%20(substringof('Star%20Wars',ShortSynopsis)%20or%20substringof('Star%20Wars',Url)%20or%20(substringof('Star%20Wars',Rating)%20or%20substringof('Star%20Wars',Type)))%20or%20(substringof('Star%20Wars',WebsiteUrl)%20or%20substringof('Star%20Wars',NetflixApiId)%20or%20substringof('Star%20Wars',TinyUrl))&amp;amp;$skip=0&amp;amp;$top=45&amp;amp;$expand=Movie,Series,Season,Disc&amp;amp;$select=*,Movie/*,Series/*,Season/*,Disc/*&lt;/font&gt;   &lt;p&gt;In this case it can take over 15 seconds to display the results depending on my connection speed to this public OData service. We can speed up both of these queries considerably by limiting the number of properties that must be searched. You can do that by opening up the entity in the Data Designer and marking fields “Is Searchable” in the properties window. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3404.image_5F00_695960E0.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5076.image_5F00_thumb_5F00_48D2212E.png" width="813" height="431" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can also uncheck this for an entire entity. If you do, then when you add the entity to screens, the screen query will have “Support search” unchecked, which removes the search box from the UI.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7711.image_5F00_244093AA.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1351.image_5F00_thumb_5F00_03B953F8.png" width="484" height="543" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Keep in mind that the “Is Searchable” property on the entity controls the behavior regardless of what you do in the UI. So if you turn “Support search” on in the screen designer, but it is unchecked in the data designer, then the entity will not be searchable and a message will appear to the user that attempts to perform a search in the UI. &lt;/p&gt;  &lt;p&gt;In the case of customer above we don’t need to waste our time searching through properties we’re never going to display to the user like password information. And in the case of the OData service data source, if I decide to only allow searching on the Title’s Name &amp;amp; Synopsis then the query will now be much quicker. &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;GET &lt;/font&gt;&lt;a href="http://odata.netflix.com/v2/Catalog/Titles()?"&gt;&lt;font face="Courier New"&gt;http://odata.netflix.com/v2/Catalog/Titles()?&lt;/font&gt;&lt;/a&gt;&lt;font face="Courier New"&gt;$orderby=Name&amp;amp;$filter=substringof('Star%20Wars',Name)%20or%20substringof('Star%20Wars',Synopsis)&amp;amp;$skip=0&amp;amp;$top=45&amp;amp;$expand=Movie,Series,Season,Disc&amp;amp;$select=*,Movie/*,Series/*,Season/*,Disc/* &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: In Visual Studio 11 Beta, the default behavior for OData sources is the same as database data sources. However we are changing this at final release where not all properties will have “Is Searchable” checked by default, so that querying OData sources will be much quicker.&lt;/p&gt;  &lt;h3&gt;Data Set / Page Size&lt;/h3&gt;  &lt;p&gt;On the screen designer you can also set the page size to control the size of the result sets that are returned. Here you can fine-tune how many rows of data will come down per page by selecting the screen query and then setting the number of items to display per page in the properties window. By default 45 rows per page are brought down. This helps control the bandwidth you are using when bringing results down from the server to the client. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8204.image_5F00_1C48F148.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2425.image_5F00_thumb_5F00_34D88E98.png" width="475" height="548" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Auto Executing Queries&lt;/h3&gt;  &lt;p&gt;By default LightSwitch also auto-executes queries for you. This means you don’t need to do anything to have data load into screens. Sometimes, however, you can make considerable performance gains by controlling this yourself. For instance, if you are creating a custom search screen with many optional parameters you may want to uncheck “Auto Execute Query” to allow users to first specify search criteria and then issue the search at once. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5483.image_5F00_6259AE5B.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4075.image_5F00_thumb_5F00_65F7C938.png" width="483" height="545" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For instance, say we want to create our own search screen for titles and only allow searching on the Name and the Synopsis. We first create a query that makes both of these parameters optional. (For more information see: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2010/11/09/creating-a-custom-search-screen-in-visual-studio-lightswitch.aspx"&gt;Creating a &lt;em&gt;Custom&lt;/em&gt; &lt;em&gt;Search&lt;/em&gt; Screen in Visual Studio LightSwitch&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5657.image_5F00_2C74B941.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4064.image_5F00_thumb_5F00_59F5D904.png" width="751" height="414" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;When we use the query on a screen, uncheck the “Auto execute query” and then add a command button that the user can click to execute the search once they enter all of the optional parameters they want to search. Then we simply write this code to load the results:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Search_Execute()
    &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.TitleSearch.Load()
&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;Static Spans&lt;/h3&gt;

&lt;p&gt;Static spans have been around since LightSwitch V1. These are used if you want to make sure to include (or exclude) related entities in the query that loads your data. You typically only need to use this if you are using the related data in your screen code because LightSwitch can see if you are using related data on the screen itself within the content tree and will automatically include this data for you. To control this, first click the “Edit Query” link on the screen query.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1348.image_5F00_2B9C5357.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3007.image_5F00_thumb_5F00_4B4B2D1F.png" width="477" height="152" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then in the properties window, select “Manage Included Data” to select what data to include.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2018.image_5F00_6AFA06E7.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7624.image_5F00_thumb_5F00_4A72C735.png" width="736" height="538" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;More Tips &amp;amp; Tricks&lt;/h3&gt;

&lt;p&gt;These are just some of the query-related things you can do within LightSwitch to help performance. Of course there are a lot of factors outside LightSwitch that can affect performance, like the speed of your data sources and services you are using. For more tips and tricks see:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/09/15/filtering-lookup-lists-with-large-amounts-of-data-on-data-entry-screens.aspx" target="_blank"&gt;Filtering Lookup Lists with Large Amounts of Data on Data Entry Screens&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2010/11/09/creating-a-custom-search-screen-in-visual-studio-lightswitch.aspx"&gt;Creating a Custom Search Screen in Visual Studio LightSwitch&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh499661.aspx"&gt;How Do I: Create Custom Search Screens in LightSwitch?&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/10/17/lightswitch-tips-amp-tricks-on-dnrtv.aspx" target="_blank"&gt;LightSwitch Tips &amp;amp; Tricks on dnrTV&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10310608" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Data/">Data</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/OData/">OData</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Queries/">Queries</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>.NET Rocks! Podcast: Beth Massi Builds Apps with LightSwitch in Studio 11</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/05/22/net-rocks-podcast-beth-massi-builds-apps-with-lightswitch-in-studio-11.aspx</link><pubDate>Tue, 22 May 2012 16:51:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10309007</guid><dc:creator>Beth Massi</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10309007</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/05/22/net-rocks-podcast-beth-massi-builds-apps-with-lightswitch-in-studio-11.aspx#comments</comments><description>&lt;p&gt;Check it out, I’ve got another podcast with Richard and Carl this time talking about the new features in LightSwitch in Visual Studio 11. I always have a ton of fun talking with these guys and you can tell I’m super excited about the next version of LightSwitch. &lt;/p&gt;  &lt;p&gt;Show #769: &lt;a href="http://www.dotnetrocks.com/default.aspx?showNum=769"&gt;Beth Massi Builds Apps with LightSwitch in Studio 11&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Carl and Richard talk to Beth Massi about the latest incarnation of LightSwitch. In 2011 LightSwitch shipped as a separate install, but the upcoming version of LightSwitch is part of every SKU of Studio 11. Beth talks about how LightSwitch has evolved to be an awesome consumer and creator of data, making it simple to create oData interfaces over anything. The conversation also digs into the role of Silverlight, the evolution of the client and how LightSwitch makes apps in the cloud much simpler.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10309007" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Silverlight/">Silverlight</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Podcast/">Podcast</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>"What’s New with LightSwitch in Visual Studio 11" Recording Available</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/05/14/what-s-new-with-lightswitch-in-visual-studio-11-recording-available.aspx</link><pubDate>Mon, 14 May 2012 19:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10305047</guid><dc:creator>Beth Massi</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10305047</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/05/14/what-s-new-with-lightswitch-in-visual-studio-11-recording-available.aspx#comments</comments><description>&lt;p&gt;On Friday last week I delivered a webcast on the new LightSwitch features in &lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads" target="_blank"&gt;Visual Studio 11 beta&lt;/a&gt;. I think it went pretty well considering it was the first time I had done the session end-to-end :-). You can now view the webcast recording here:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;Download: What's New with LightSwitch in Visual Studio 11&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-family: 'Calibri','sans-serif'; font-size: 11pt;"&gt;&lt;br /&gt;&lt;a href="http://dlbmodigital.microsoft.com/webcasts/wmv/24355_Dnl_L.wmv"&gt;WMV Download&lt;/a&gt; | &lt;a href="http://dlbmodigital.microsoft.com/audio/24355.wma"&gt;WMA&lt;/a&gt;&amp;nbsp;| &lt;a href="http://dlbmodigital.microsoft.com/audio/24355.mp4"&gt;MP4&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In the session we built an application called &amp;ldquo;Media Mate&amp;rdquo; that connects to the &lt;a href="http://odata.netflix.com/v2/Catalog/" target="_blank"&gt;Netflix OData source&lt;/a&gt; to keep track of favorite movies and music. I showed off new features around all our OData work like how to consume external OData services. I also demonstrated how LightSwitch creates its own OData services adhering to your business rules and security settings so that other clients on different platforms can access your middle-tier easily and securely. I showed off some of the new UI enhancements and business types as well as some of the new deployment enhancements. I attached the presentation slides to the bottom of this post.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0272.image_5F00_69E36065.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6038.image_5F00_thumb_5F00_54197808.png" width="571" height="356" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;One demo hiccup happened where I messed up the search ability over the Netflix data. Doh! What I ended up doing is unchecking the IsSearchable property on the Title entity in the data designer which subsequently disabled the searching on the screen. So it was user error, not a beta bug ;-). At any rate, I think folks got the point. By the way, there are a lot of things you can do to improve search query performance in LightSwitch and I&amp;rsquo;ll follow up with a post about that soon.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4314.image_5F00_735C1EDB.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7610.image_5F00_thumb_5F00_07753B65.png" width="584" height="219" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I also demonstrated the updated Contoso Construction sample that you can download here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For more information on the new features I demonstrated please see:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://bit.ly/LightSwitchDev11" target="_blank"&gt;LightSwitch in Visual Studio 11 Beta Resources&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/06/enhance-your-lightswitch-applications-with-odata-beth-massi.aspx"&gt;Enhance Your LightSwitch Applications with OData &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx"&gt;Creating and Consuming LightSwitch OData Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/04/17/lightswitch-companion-client-examples-using-odata.aspx"&gt;LightSwitch Companion Client Examples using OData&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/22/lightswitch-architecture-odata.aspx"&gt;LightSwitch Architecture: OData &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/15/lightswitch-cosmopolitan-shell-and-theme-for-visual-studio-11-beta-released.aspx"&gt;LightSwitch Cosmopolitan Shell and Theme for Visual Studio 11 &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/24/user-defined-relationships-within-attached-database-data-sources-michael-simons.aspx"&gt;User Defined Relationships within Attached Database Data Sources &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/17/filtering-data-using-entity-set-filters-michael-simons.aspx"&gt;Filtering Data using Entity Set Filters &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/28/new-business-types-percent-amp-web-address-andrew-lader.aspx"&gt;New Business Types: Percent &amp;amp; Web Address &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/05/08/how-to-add-images-and-text-to-your-lightswitch-applications-andrew-lader.aspx"&gt;How to Add Images and Text to your LightSwitch Applications &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/19/how-to-use-the-new-lightswitch-group-box-andrew-lader.aspx"&gt;How to Use the New LightSwitch Group Box &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/11/ui-design-improvements-part-1-formatting-numeric-data-andrew-lader.aspx"&gt;How to Format Values in LightSwitch &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/03/active-directory-group-support-matt-thalman.aspx"&gt;Active Directory Group Support &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/29/lightswitch-iis-deployment-enhancements-in-visual-studio-11.aspx"&gt;LightSwitch IIS Deployment Enhancements in Visual Studio 11&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also don&amp;rsquo;t forget to visit the &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;LightSwitch Developer Center&lt;/a&gt;, your one-stop-shop for learning all about LightSwitch.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10305047" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-30-50-47/WhatsNewLightSwitch.zip" length="1738808" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Webcast/">Webcast</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>Modernize Apps Look &amp; Feel with Metro Studio and the Cosmopolitan Shell</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/05/08/modernize-apps-look-amp-feel-with-metro-studio-and-the-cosmopolitan-shell.aspx</link><pubDate>Tue, 08 May 2012 19:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10302453</guid><dc:creator>Beth Massi</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10302453</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/05/08/modernize-apps-look-amp-feel-with-metro-studio-and-the-cosmopolitan-shell.aspx#comments</comments><description>&lt;p&gt;One of the design goals for &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh852657" target="_blank"&gt;LightSwitch in Visual Studio 11&lt;/a&gt; was to modernize the look and feel of the UI. Back in March the team released the beta of the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=244284&amp;amp;clcid=0x409" target="_blank"&gt;LightSwitch Cosmopolitan Shell and Theme&lt;/a&gt;. This theme and shell provides a bunch of improvements over the default one like displaying a logo at the top of the application, streamlined top-bar navigation menu, and a &amp;ldquo;Metro-style&amp;rdquo; command bar now located at the bottom of screens. This shell will become part of the product and the default shell and theme for new projects you build with LightSwitch in Visual Studio 11 at final release.&lt;/p&gt;
&lt;p&gt;So I &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/19/lightswitch-cosmopolitan-shell-and-theme-for-vs-11-beta.aspx" target="_blank"&gt;attempted to apply the Cosmo shell to my Contoso Construction application&lt;/a&gt; a while back and I got a couple remarks about how my icons were pretty much sticking out like a&amp;nbsp;sore thumb. I used traditional colorful icons in the application and while that looks great with the standard shell, it doesn&amp;rsquo;t fit well with the Metro-style icons in the Cosmopolitan shell. Unfortunately I didn&amp;rsquo;t have time to redraw the icons -- and let&amp;rsquo;s face it, I&amp;rsquo;m not a designer.&lt;/p&gt;
&lt;h3&gt;Enter Syncfusion Metro Studio&lt;/h3&gt;
&lt;p&gt;Luckily there&amp;rsquo;s a FREE tool out there that you can use to quickly create Metro-style icons! Last night I was reviewing a LightSwitch e-book from &lt;a href="http://janvanderhaegen.wordpress.com/" target="_blank"&gt;Jan&lt;/a&gt; (to be released soon I hear!) and he mentioned this free tool so I had to go check it out, &lt;a href="http://www.syncfusion.com/downloads/metrostudio" target="_blank"&gt;Syncfusion Metro Studio&lt;/a&gt;. And yes it&amp;rsquo;s free! Thank you Syncfusion for supporting the community (and particularly the developers who can&amp;rsquo;t draw!)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.syncfusion.com/downloads/metrostudio" target="_blank"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3513.image_5F00_20583DA5.png" width="214" height="59" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This tool comes with a bunch of icon templates you can use to get started designing your own Metro-style icons and it&amp;rsquo;s super easy to use.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8780.image_5F00_4007176D.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0880.image_5F00_thumb_5F00_7F64CAFD.png" width="538" height="460" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Pick a template and then you can change the sizing, shape, foreground, and background color. You can also view &amp;amp; copy the XAML or save it as a PNG.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8780.image_5F00_1EA771D1.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6237.image_5F00_thumb_5F00_5E052561.png" width="563" height="370" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For LightSwitch applications that use the Cosmo shell, it&amp;rsquo;s best to go with a Transparent background so that the light grey of the command bar comes through. Although Metro Studio doesn&amp;rsquo;t let you choose a transparent background in the color picker, you can simply type it in the textbox (like I show above).&lt;/p&gt;
&lt;h3&gt;Contoso Construction Updated&lt;/h3&gt;
&lt;p&gt;It took me about 20 minutes to update all the icons in the Contoso Contruction application and here&amp;rsquo;s what I came up with. Not bad for not being a designer :-). You can download the updated sample here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd" target="_blank"&gt;&lt;img style="margin: 0px 4px 0px 0px; border: 0px currentcolor; display: inline; background-image: none;" title="Download" border="0" alt="Download" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3326.Download_5F00_12394EA8.png" width="32" height="32" valign="center" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3581.Contoso1sm_5F00_31E82870.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="Contoso1sm" border="0" alt="Contoso1sm" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4571.Contoso1sm_5F00_thumb_5F00_1C1E4013.png" width="681" height="507" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.syncfusion.com/downloads/metrostudio" target="_blank"&gt;Syncfusion Metro Studio&lt;/a&gt; is a huge time-saver and all the icons you create are royalty-free even for commercial applications. Have fun &amp;ldquo;Metro-styling&amp;rdquo; your apps!&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10302453" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Extensibility/">Extensibility</category></item><item><title>I’m Speaking Next Week on What’s New with LightSwitch in Visual Studio 11</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/05/04/i-m-speaking-next-week-on-what-s-new-with-lightswitch-in-visual-studio-11.aspx</link><pubDate>Fri, 04 May 2012 20:58:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10301176</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10301176</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/05/04/i-m-speaking-next-week-on-what-s-new-with-lightswitch-in-visual-studio-11.aspx#comments</comments><description>&lt;p&gt;I’ll be speaking next week at the East Bay.NET User Group in Berkeley as well as delivering a MSDN webcast on What’s New with LightSwitch in Visual Studio 11. I hope you can either make it in person or join in online to see and discuss the exciting new features LightSwitch will bring you. I always have a blast delivering these so I hope you can join!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What's New with LightSwitch in Visual Studio 11      &lt;br /&gt;&lt;/strong&gt;&lt;em&gt;Microsoft Visual Studio LightSwitch is the simplest way to build business applications and data services for the desktop and the cloud. LightSwitch contains several new features and enhanced capabilities in Visual Studio 11. In this demonstration-heavy webcast, we walk through the major new features, such as creating and consuming OData services, new controls and formatting, new features with the security system and deployment, and much more.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;East Bay.NET User Group: &lt;a href="http://www.meetup.com/BayNET/events/58433222/" target="_blank"&gt;What's New with LightSwitch in Visual Studio 11&lt;/a&gt;     &lt;br /&gt;&lt;strong&gt;Thursday, May 10, 2012 6:45 PM Pacific Time&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.meetup.com/BayNET/events/58433222/" target="_blank"&gt;Register here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;MSDN Webcast: &lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032510992&amp;amp;Culture=en-US"&gt;What's New with LightSwitch in Visual Studio 11&lt;/a&gt;&amp;#160; &lt;br /&gt;&lt;strong&gt;Friday, May 11, 2012 1:00 PM Pacific Time&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032510992&amp;amp;Culture=en-US"&gt;Register here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hope to see you there!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10301176" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Speaking/">Speaking</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Webcast/">Webcast</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>LightSwitch Community &amp; Content Rollup–April 2012</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/05/01/lightswitch-community-amp-content-rollup-april-2012.aspx</link><pubDate>Tue, 01 May 2012 14:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10299352</guid><dc:creator>Beth Massi</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10299352</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/05/01/lightswitch-community-amp-content-rollup-april-2012.aspx#comments</comments><description>&lt;p&gt;Last Fall I started posting a rollup of interesting community happenings, content, samples and extensions popping up around &lt;a href="http://msdn.com/lightswitch"&gt;Visual Studio LightSwitch&lt;/a&gt;. If you missed those rollups you can check them all out here: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/tags/rollup/"&gt;LightSwitch Community &amp;amp; Content Rollups&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;April continued to roll out content around Visual Studio 11 Beta since it was released back on February 29th. If you haven’t done so already, I encourage you to give it a spin by &lt;a href="http://go.microsoft.com/fwlink/?LinkId=240162"&gt;downloading Visual Studio 11 Beta&lt;/a&gt;. Also make sure to check out these LightSwitch Beta resources and community sites:&lt;/p&gt;  &lt;p&gt;Have an idea?: &lt;a href="http://visualstudio.uservoice.com/forums/127959-visual-studio-lightswitch"&gt;LightSwitch UserVoice site&lt;/a&gt;&amp;#160; &lt;br /&gt;Need to report a bug?: &lt;a href="http://connect.microsoft.com/lightswitch" target="_blank"&gt;LightSwitch Connect site&lt;/a&gt;    &lt;br /&gt;Have a question?: &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/LightSwitchDev11Beta/threads" target="_blank"&gt;LightSwitch Beta Forum&lt;/a&gt;    &lt;br /&gt;Need to learn what’s new?: &lt;a href="http://bit.ly/LightSwitchDev11" target="_blank"&gt;LightSwitch Developer Center&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;LightSwitch in Visual Studio Beta Resources&lt;/h3&gt;  &lt;p&gt;If you haven’t noticed the LightSwitch team has been releasing a lot of good content around the next version of LightSwitch in Visual Studio 11. Check out the &lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt; for a list of key Beta resources for you to explore. Here’s some of our more popular content:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=5ce428e1-fb18-49e4-95c8-a6c70116ee70&amp;amp;title=Announcing+LightSwitch+in+Visual+Studio+11+Beta&amp;amp;uri=http%3a%2f%2fblogs.msdn.com%2fb%2flightswitch%2farchive%2f2012%2f02%2f29%2fannouncing-lightswitch-in-visual-studio-11-beta.aspx&amp;amp;k=hePB4W27B4QsBkU%2frYGwhAHl6j3JJXfPR0DqoFh8Sb4%3d"&gt;Announcing LightSwitch in Visual Studio 11 Beta&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=72cf874c-ea1b-4ee6-bfe9-dff9a4006a50&amp;amp;title=Contoso+Construction+-+LightSwitch+Advanced+Sample+(Visual+Studio+11+Beta)&amp;amp;uri=http%3a%2f%2fcode.msdn.microsoft.com%2fContoso-Construction-338952fd&amp;amp;k=m%2fZFNExe8AZ0QLQ1xA2gp%2bI4pwRWGmljbIQ6iW%2bi4dQ%3d"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=b3b47090-4dad-4fa7-b17b-21f15b3206b2&amp;amp;title=LightSwitch+Architecture%3a+OData+&amp;amp;uri=http%3a%2f%2fblogs.msdn.com%2fb%2flightswitch%2farchive%2f2012%2f03%2f22%2flightswitch-architecture-odata.aspx&amp;amp;k=BxDMnCK2GKQwGufla1hxk%2bWrCoNpg%2fjsarRTNwNtJ%2bs%3d"&gt;LightSwitch Architecture: OData&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=b55cc4b9-2577-4dde-a1ad-838f7c2d5c67&amp;amp;title=LightSwitch+Beta+Documentation+&amp;amp;uri=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fhh708878(v%3dVS.110).aspx&amp;amp;k=PM3c3sURbxhXc1axtNYOMlEfWuzpxR5FHcxmvWrE11M%3d"&gt;LightSwitch Beta Documentation &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=8c22c029-204b-4352-9dbb-60e9dec3e7b8&amp;amp;title=LightSwitch+Cosmopolitan+Shell+and+Theme&amp;amp;uri=http%3a%2f%2fvisualstudiogallery.msdn.microsoft.com%2fdc25522b-4a60-4f19-a5f8-bdec898f6599%3fSRC%3dFeatured&amp;amp;k=6%2fIwjcy8cxzLRWCJ3bGDfCQMjaGNc%2f3uWwYJ8P8z%2fY8%3d"&gt;LightSwitch Cosmopolitan Shell and Theme&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=7606223a-e5aa-47b8-b268-f34d2a393deb&amp;amp;title=LightSwitch+Extensibility+Toolkit+for+Visual+Studio+11+Beta&amp;amp;uri=http%3a%2f%2fvisualstudiogallery.msdn.microsoft.com%2f2381b03b-5c71-4847-a58e-5cfa48d418dc&amp;amp;k=W12tiNMW4GpkyxzENjvNlorqPB5qF1lfkJ828klZxG0%3d"&gt;LightSwitch Extensibility Toolkit for Visual Studio 11 Beta&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5127.image_5F00_47DC491B.png"&gt;&lt;img style="margin: 0px 10px 0px 0px; float: left; display: inline; background-image: none;" title="www.odata.org" border="0" alt="www.odata.org" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6281.image_5F00_thumb_5F00_606BE66B.png" width="67" height="65" /&gt;&lt;/a&gt;Companion Client Examples&lt;/h3&gt;  &lt;p&gt;One of the biggest features with LightSwitch in &lt;a href="http://msdn.microsoft.com/en-us/vstudio/hh852657"&gt;Visual Studio 11&lt;/a&gt; is the &lt;a href="http://blogs.msdn.com/b/bethmassi/www.odata.org"&gt;Open Data Protocol&lt;/a&gt; (OData) support. Not only can you consume OData services in LightSwitch, the middle-tier services are also now exposed as OData service endpoints reachable by other clients. In April, the community posted many more examples of alternative clients that you can build against your LightSwitch services. I’d like to particularly thank Michael Washington who runs the &lt;a href="http://www.LightSwitchHelpWebsite.com"&gt;www.LightSwitchHelpWebsite.com&lt;/a&gt; who has been on fire this month posting most of these. Awesome!&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="637"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="110"&gt;Excel PowerPivot:&lt;/td&gt;        &lt;td valign="top" width="525"&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx"&gt;Creating and Consuming LightSwitch OData Services&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="110"&gt;Windows 8:&lt;/td&gt;        &lt;td valign="top" width="525"&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/13/using-lightswitch-odata-services-in-a-windows-8-metro-style-application-elizabeth-maher.aspx"&gt;Using LightSwitch OData Services in a Windows 8 Metro Style Application &lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="110"&gt;Windows Phone:&lt;/td&gt;        &lt;td valign="top" width="525"&gt;&lt;a href="http://msdn.microsoft.com/en-us/magazine/hh875176.aspx"&gt;Consume a LightSwitch OData Service from a Windows Phone application&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="110"&gt;HTML/JavaScript:&lt;/td&gt;        &lt;td valign="top" width="525"&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/128/A-Full-CRUD-DataJs-and-KnockoutJs-LightSwitch-Example-Using-Only-An-Html-Page.aspx"&gt;A Full CRUD DataJs and KnockoutJs LightSwitch Example Using Only An .Html Page&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="110"&gt;JQuery Mobile:&lt;/td&gt;        &lt;td valign="top" width="525"&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/126/A-Full-CRUD-LightSwitch-JQuery-Mobile-Application.aspx"&gt;A Full CRUD LightSwitch JQuery Mobile Application&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="110"&gt;Android: &lt;/td&gt;        &lt;td valign="top" width="525"&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/125/Communicating-With-LightSwitch-Using-Android-App-Inventor.aspx"&gt;Communicating With LightSwitch Using Android App Inventor&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="110"&gt;Unity 3D: &lt;/td&gt;        &lt;td valign="top" width="525"&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/134/Using-Visual-Studio-LightSwitch-To-Orchestrate-A-Unity-3D-Game.aspx" target="_blank"&gt;Using Visual Studio LightSwitch To Orchestrate A Unity 3D Game&lt;/a&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;h3&gt;MSDN Magazine Column: Leading LightSwitch&lt;a href="http://msdn.microsoft.com/hh882439.aspx"&gt;&lt;img style="margin: 0px 0px 0px 10px; float: right; display: inline;" title="April 2012" border="0" alt="April 2012" align="right" src="http://i.msdn.microsoft.com/hh882439.cover_lrg(en-us,MSDN.10).png" width="86" height="115" /&gt;&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;One of our other LightSwitch community rock stars started a new LightSwitch column in MSDN Magazine in March. &lt;a href="http://janvanderhaegen.wordpress.com/"&gt;Jan van der Haegen&lt;/a&gt; continues his journey into the depths of LightSwitch with his second article in the April issue:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/magazine/hh965661.aspx"&gt;Leading LightSwitch:&lt;/a&gt;&lt;/strong&gt; &lt;a href="http://msdn.microsoft.com/en-us/magazine/hh965661.aspx"&gt;The LightSwitch MVVM Model&lt;/a&gt;    &lt;br /&gt;&lt;em&gt;In this month’s Leading LightSwitch column, Jan explains MV3, a variation of the MVVM application architecture used for LightSwitch apps that is even more powerful than the original application architecture.&amp;#160;&amp;#160;&amp;#160; &lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;New Visual Studio LightSwitch Books Released&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.oreillynet.com/pub/au/5162"&gt;Paul Ferrill&lt;/a&gt; released his new book in the beginning of April on building &lt;a href="http://shop.oreilly.com/product/0636920024347.do"&gt;SharePoint Apps with LightSwitch&lt;/a&gt;. It sounds like this is a short book for the LightSwitch beginner looking to connect to SharePoint data. &lt;/p&gt;  &lt;p&gt;Also released was &lt;a href="http://www.amazon.com/Visual-Studio-LightSwitch-Development-ebook/dp/B007MRRGDS/" target="_blank"&gt;Pro Visual Studio LightSwitch 2011 Development&lt;/a&gt; by &lt;a href="http://www.amazon.com/Tim-Leung/e/B0065L2JD4/ref=ntt_athr_dp_pel_1" target="_blank"&gt;Tim Leung&lt;/a&gt; and &lt;a href="http://social.msdn.microsoft.com/profile/Yann%20Duran" target="_blank"&gt;Yann Duran&lt;/a&gt;. You may have seen these guys helping answer questions in the LightSwitch forums and they really know their stuff.&lt;/p&gt;  &lt;p&gt;More LightSwitch books to check out:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;&lt;a href="http://www.amazon.com/Beginning-LightSwitch-Development-Programmer-ebook/dp/B005CCW996/" target="_blank"&gt;Beginning Microsoft Visual Studio LightSwitch Development&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.amazon.com/Creating-LightSwitch-Controls-Intermediate-ebook/dp/B005D5J2WO/" target="_blank"&gt;Creating Visual Studio LightSwitch Custom Controls (Beginner to Intermediate)&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.amazon.com/Developing-Real-world-Applications-LightSwitch-ebook/dp/B005VCRLU4/" target="_blank"&gt;Developing Real-world Applications with LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.amazon.com/Microsoft-LightSwitch-Application-Development-ebook/dp/B005PR5FJO/ref=pd_sxp_grid_pt_1_0"&gt;Microsoft Visual Studio LightSwitch Business Application Development&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.amazon.com/Microsoft-Visual-Studio-LightSwitch-Unleashed/dp/0672335530" target="_blank"&gt;Microsoft Visual Studio LightSwitch Unleashed&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;&lt;a href="http://www.xpert360.com/lightning_products.html"&gt;&lt;img style="margin: 0px 10px 0px 0px; float: left; display: inline; background-image: none;" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7367.image_5F00_4703E331.png" width="222" height="44" /&gt;&lt;/a&gt;Xpert 360’s Dynamics CRM Online Adapter LightSwitch Extension Released&lt;/h3&gt;  &lt;p&gt;In April &lt;a href="http://www.xpert360.com/" target="_blank"&gt;Xpert 360&lt;/a&gt; released a FREE LightSwitch extension that allows you to connect to Dynamics CRM. Looks like they are also working on one for connecting to Salesforce. Check out these resources to get started:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Download: &lt;a href="http://www.xpert360.com/lightning_products.html" target="_blank"&gt;Lightning Adapter for Microsoft Dynamics CRM&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Quick Start: &lt;a href="http://support.xpert360.com/entries/21101148-using-the-microsoft-dynamics-crm-online-adapter-in-visual-studio-lightswitch"&gt;Using the Microsoft Dynamics CRM Online Adapter in Visual Studio LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Tutorial (via LightSwitch Help Website): &lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/124/Xpert-360-rsquo-s-Dynamics-CRM-Online-Adapter-LightSwitch-Extension.aspx"&gt;Xpert 360’s Dynamics CRM Online Adapter LightSwitch Extension&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Other Commercial LightSwitch Extensions from our Partners&lt;/h3&gt;  &lt;p&gt;Many of our Visual Studio partners who build LightSwitch extensions injected into the #LightSwitch twitter feed this month to remind us of these great products, some with new features recently added.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.componentone.com/SuperProducts/StudioLightSwitch/" target="_blank"&gt;ComponentOne LightSwitch Extensions&lt;/a&gt; – FlexGrid, OLAP, Scheduler&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.devexpress.com/Products/NET/Controls/LightSwitch/" target="_blank"&gt;DevExpress XtraReports for LightSwitch&lt;/a&gt; – Rich client-side reporting&lt;/li&gt;    &lt;li&gt;&lt;a href="http://firstfloorsoftware.com/documenttoolkit/lightswitch/" target="_blank"&gt;First Floor Software Document Toolkit for LightSwitch&lt;/a&gt; – store &amp;amp; view documents &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.infragistics.com/dotnet/netadvantage/lightswitch-controls.aspx#Overview" target="_blank"&gt;Infragistics NetAdvantage Controls for LightSwitch&lt;/a&gt; – mask editors, gauges, charts, data grid, themes, shell&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.rssbus.com/lightswitch/" target="_blank"&gt;RSSBus Data Providers for LightSwitch&lt;/a&gt; – 14 data providers for a variety of data sources&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;MSDN Webcast: What's New with LightSwitch in Visual Studio 11&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032510992&amp;amp;Culture=en-US" target="_blank"&gt;&lt;img style="margin: 0px 0px 0px 1px; border: 0px currentcolor; float: right; display: inline; background-image: none;" border="0" alt="MSDN Webcast: What&amp;#39;s New with LightSwitch in Visual Studio 11 (Level 200)" align="right" src="https://mseventsww.microsoft.com/BannerImages/2f7de49f-ddf7-42e7-b754-0a75af021e5e.jpg" width="177" height="45" /&gt;&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;Join me &lt;strong&gt;Friday May 11th 1:00 PM PST &lt;/strong&gt;for &lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032510992&amp;amp;Culture=en-US" target="_blank"&gt;What's New with LightSwitch in Visual Studio 11&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Microsoft Visual Studio LightSwitch is the simplest way to build business applications and data services for the desktop and the cloud. LightSwitch contains several new features and enhanced capabilities in Visual Studio 11. In this demonstration-heavy webcast, we walk through the major new features, such as creating and consuming OData services, new controls and formatting, new features with the security system and deployment, and much more.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032510992&amp;amp;Culture=en-US"&gt;Register here.&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Notable Content this Month&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;Extensions (&lt;/strong&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date"&gt;see all 85 of them here!&lt;/a&gt;&lt;strong&gt;):&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In addition to the above, we had a few more extensions from the community released this month. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/bbe013bf-45b6-46c4-ba13-537cc23c5118"&gt;Elyl's Extensions &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/8719e4c4-6689-4c1b-bf62-c95896275208"&gt;MicroApplications LightSwitch Business Types &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/bf2b6703-d705-4d8f-be1b-4b5b359e7f98"&gt;Shells by DELORDSON &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Samples (&lt;/strong&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date" target="_blank"&gt;see all 80 of them here&lt;/a&gt;&lt;strong&gt;):&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/Executing-a-Simple-Stored-b43fe7e5"&gt;Executing a Simple Stored Procedure in LightSwitch &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/Display-a-chart-built-on-eb631504"&gt;Display a chart built on aggregated data in Visual Studio LightSwitch &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/vstudio/Updating-Records-in-c88c7997"&gt;Updating Records in LightSwitch using Stored Procedures &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Team Articles:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Lots more articles from the team this month on all the new features in LightSwitch in Visual Studio 11.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/03/active-directory-group-support-matt-thalman.aspx"&gt;Active Directory Group Support &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/05/odata-apps-in-lightswitch-part-2-matt-sampson.aspx" target="_blank"&gt;Creating a LightSwitch Application Using the Commuter OData Service, Part 2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/17/filtering-data-using-entity-set-filters-michael-simons.aspx"&gt;Filtering Data using Entity Set Filters &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/11/ui-design-improvements-part-1-formatting-numeric-data-andrew-lader.aspx"&gt;How to Format Values in LightSwitch &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/19/how-to-use-the-new-lightswitch-group-box-andrew-lader.aspx"&gt;How to Use the New LightSwitch Group Box &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/04/26/using-the-save-and-query-pipeline-to-flag-and-filter-data-with-lightswitch-in-visual-studio-11.aspx"&gt;Using the Save and Query Pipeline to Flag and Filter Data with LightSwitch in Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/24/user-defined-relationships-within-attached-database-data-sources-michael-simons.aspx"&gt;User Defined Relationships within Attached Database Data Sources &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/04/19/working-with-sql-server-localdb-in-lightswitch-projects-in-visual-studio-11.aspx"&gt;Working with SQL Server LocalDB in LightSwitch Projects in Visual Studio 11&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We also had a couple top requested How To posts that apply to all versions of LightSwitch:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/23/executing-a-simple-stored-procedure-in-lightswitch-eric-erhardt.aspx"&gt;Executing a Simple Stored Procedure in LightSwitch &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/30/updating-records-in-lightswitch-using-stored-procedures-eric-erhardt.aspx"&gt;Updating Records in LightSwitch using Stored Procedures &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Community Content:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/128/A-Full-CRUD-DataJs-and-KnockoutJs-LightSwitch-Example-Using-Only-An-Html-Page.aspx"&gt;A Full CRUD DataJs and KnockoutJs LightSwitch Example Using Only An .Html Page&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/126/A-Full-CRUD-LightSwitch-JQuery-Mobile-Application.aspx"&gt;A Full CRUD LightSwitch JQuery Mobile Application&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.pragmaswitch.com/?p=291"&gt;A Generic Audit trail solution – revisited&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/133/A-LightSwitch-Netflix-OData-Mash-up.aspx"&gt;A LightSwitch Netflix OData Mash-up&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/125/Communicating-With-LightSwitch-Using-Android-App-Inventor.aspx"&gt;Communicating With LightSwitch Using Android App Inventor&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/129/DELORDSON-Releases-6-Exciting-New-Shells.aspx"&gt;DELORDSON Releases 6 Exciting New Shells&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/04/08/how-to-make-your-required-fields-not-have-a-bold-label-using-extensions-made-easy-by-kirk-brownfield/"&gt;How to make your required fields NOT have a bold label using Extensions Made Easy… &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://openlightgroup.net/Blog/tabid/58/EntryId/196/LightSwitch-And-OData-Like-Putting-Out-A-Fire-With-A-Telephone.aspx"&gt;LightSwitch And OData: Like Putting Out A Fire With A Telephone&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;SD Times: &lt;a href="http://www.sdtimes.com/content/article.aspx?ArticleID=36550&amp;amp;utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+SdTimesLatestNews+%28SD+Times+All+News%29"&gt;Flipping on LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/130/Shape-your-LightSwitch-OData-Using-WCF-RIA-Services.aspx"&gt;Shape Your LightSwitch OData Using WCF RIA Services&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/134/Using-Visual-Studio-LightSwitch-To-Orchestrate-A-Unity-3D-Game.aspx"&gt;Using Visual Studio LightSwitch To Orchestrate A Unity 3D Game&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/127/Using-The-OData-Explorer-with-LightSwitch-OData.aspx"&gt;Using The OData Explorer with LightSwitch OData&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;LightSwitch Team Community Sites&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.facebook.com/vslightswitch"&gt;&lt;img style="margin: 0px 20px 10px 0px;" border="0" alt="" align="left" src="http://badge.facebook.com/badge/151211271561073.1904.953280091.png" width="137" height="84" /&gt;&lt;/a&gt; Become a fan of &lt;a href="http://www.facebook.com/vslightswitch"&gt;Visual Studio LightSwitch on Facebook&lt;/a&gt;. Have fun and interact with us on our wall. Check out the cool stories and resources. Here are some other places you can find the LightSwitch team:     &lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/vslightswitch"&gt;LightSwitch MSDN Forums&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/lightswitch"&gt;LightSwitch Team Blog&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://twitter.com/#!/VSLightSwitch"&gt;LightSwitch on Twitter&lt;/a&gt; (@VSLightSwitch, #VisualStudio #LightSwitch) &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10299352" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Webcast/">Webcast</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Samples/">Samples</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Books/">Books</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Rollup/">Rollup</category></item><item><title>Using the Save and Query Pipeline to Flag and Filter Data with LightSwitch in Visual Studio 11</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/04/26/using-the-save-and-query-pipeline-to-flag-and-filter-data-with-lightswitch-in-visual-studio-11.aspx</link><pubDate>Thu, 26 Apr 2012 14:12:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10297839</guid><dc:creator>Beth Massi</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10297839</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/04/26/using-the-save-and-query-pipeline-to-flag-and-filter-data-with-lightswitch-in-visual-studio-11.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Note: This information applies to LightSwitch in Visual Studio 11 (LightSwitch V2)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In business applications sometimes we need to flag records with additional attributes in response to business rules and then consistently filter those flagged records in some way or another throughout the application. For instance we may have critical or historical data that must always be stored in our databases and never deleted. I used to work in the health care industry and it was important to keep historical patient data. Therefore we would not allow a user to delete a patient’s hospital visit information from the system. Over time, however this causes our data sets to get very large and distracts users from finding the relevant information they need. Hence, we need a way to flag these records and then filter this data out of our result sets across the entire application. &lt;/p&gt;  &lt;p&gt;Last year I wrote an article based on LightSwitch in Visual Studio 2010 (LightSwitch V1) showing how you can use the Save &amp;amp; Query pipeline to archive and filter records instead – effectively marking them deleted but not actually deleting them from the system: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/11/18/using-the-save-and-query-pipeline-to-archive-deleted-records.aspx" target="_blank"&gt;Using the Save and Query Pipeline to “Archive” Deleted Records&lt;/a&gt;. With LightSwitch in Visual Studio 11 (LightSwitch V2) the filtering mechanism has been improved using the new &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/17/filtering-data-using-entity-set-filters-michael-simons.aspx" target="_blank"&gt;entity set filters&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;In this post I’ll show you how to use the new entity set filter methods to apply global filtering of records. But first, let’s recap how we can flag these records using the save pipeline. &lt;/p&gt;  &lt;h3&gt;Tapping into the Save Pipeline&lt;/h3&gt;  &lt;p&gt;The save pipeline runs in the middle tier anytime an entity is being updated, inserted or deleted. This is where you can write business logic that runs as changes are processed on the middle tier and saved to data storage. Let’s take an example where we don’t want to ever physically delete customers from the system. Here’s our data model for this example. Notice that I’ve created a required field called “IsDeleted” on Customer that is the type Boolean. I’ve unchecked “Display by Default” in the properties window so that the field isn’t visible on any screens. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7142.image_5F00_thumb11_5F00_09846EFB.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image_thumb[11]" border="0" alt="image_thumb[11]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5657.image_5F00_thumb11_5F00_thumb_5F00_08AC0911.png" width="800" height="678" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In order to mark the IsDeleted field programmatically when a user attempts to delete a customer, just select the Customer entity in the data designer and drop down the “Write Code” button and select &lt;strong&gt;&lt;em&gt;Customers_Deleting&lt;/em&gt;&lt;/strong&gt; method.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5657.image_5F00_thumb16_5F00_012099A4.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image_thumb[16]" border="0" alt="image_thumb[16]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2330.image_5F00_thumb16_5F00_thumb_5F00_5FC0F407.png" width="463" height="423" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here are the 2 lines of code we need to write:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customers_Deleting(entity &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Customer&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)
&lt;/span&gt;&lt;span style="background: white; color: green;"&gt;    'First discard the changes, in this case this reverts the deletion
    &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;entity.Details.DiscardChanges()
    &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;'Next, change the IsDeleted flag to &amp;quot;True&amp;quot;
    &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;entity.IsDeleted = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;True
End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Notice that first we must call DiscardChanges in order to revert the entity back to it’s unchanged state. Then we simply set the IsDeleted field to True which puts the entity into a change state. So the appropriate save pipeline methods (&lt;em&gt;Customers_Updating&lt;/em&gt; &amp;amp;&lt;em&gt; Customers_Updated&lt;/em&gt;) will now run automatically. You can check the state of an entity by using the entity.Details.EntityState property. &lt;/p&gt;

&lt;p&gt;This save pipeline code remains unchanged from LightSwitch V1. However in LightSwitch V2, we need to filter the data differently. Let’s see how.&lt;/p&gt;

&lt;h3&gt;Using Entity Set Filters&lt;/h3&gt;

&lt;p&gt;Now that we’re successfully marking deleted customers, the next thing to do is filter them out of our queries so that they don’t display to the user on any of the screens they work with. In LightSwitch V2 a new query interception method, &lt;em&gt;EntitySet_&lt;/em&gt;Filter, has been added which allows you to specify a filter that is applied whenever an entity set is referenced. (See the recent article on the LightSwitch Team Blog by Michael Simons: &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/17/filtering-data-using-entity-set-filters-michael-simons.aspx"&gt;Filtering Data using Entity Set Filters &lt;/a&gt;for details on this new feature.)&lt;/p&gt;

&lt;p&gt;So instead of using the &lt;em&gt;Customers_All_PreprocessQuery &lt;/em&gt;like we had to in LightSwitch V1 &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/11/18/using-the-save-and-query-pipeline-to-archive-deleted-records.aspx" target="_blank"&gt;as demonstrated here&lt;/a&gt;, we can apply the IsDeleted filter in the &lt;em&gt;Customers_Filter &lt;/em&gt;method. Using the entity set Filter method is preferred over the All_PreprocessQuery method because the Filter method will execute any time the entity set is referenced, even when the entity has relationships and is not the direct target of a query. This enables true row level filtering across the application. &lt;/p&gt;

&lt;p&gt;So for this example, select the Customer entity in the data designer and drop down the “Write Code” button and select &lt;strong&gt;&lt;em&gt;Customers_Filter&lt;/em&gt;&lt;/strong&gt; method. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1854.image_5F00_thumb27_5F00_5835849A.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image_thumb[27]" border="0" alt="image_thumb[27]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4064.image_5F00_thumb27_5F00_thumb_5F00_7E9767E5.png" width="426" height="426" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we need to write a filter predicate as a lambda expression. &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Customers_Filter(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;filter &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Expressions.&lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Expression&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Of &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Func&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Of &lt;/span&gt;&lt;span style="background: white; color: rgb(43, 145, 175);"&gt;Customer&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Boolean&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;)))
    &lt;strong&gt;filter = &lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="background: white; color: blue;"&gt;Function&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;(c) c.IsDeleted = &lt;/span&gt;&lt;/strong&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;False
&lt;/strong&gt;End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;These expressions can seem a little tricky at first but they just take some practice. You can think if these as in-line functions. This one takes a customer parameter and then you return a Boolean expression used to filter the records. You can filter on anything you want, even filter based on security permissions &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/17/filtering-data-using-entity-set-filters-michael-simons.aspx" target="_blank"&gt;like Michael showed in his blog post&lt;/a&gt;. (For more information on lambda expressions see: &lt;a href="http://msdn.microsoft.com/en-us/library/bb531253.aspx"&gt;Lambda Expressions (Visual Basic)&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/bb397687.aspx"&gt;Lambda Expressions (C#)&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Now that we’ve got our Save and Query pipelines set up to handle the “deleted” Customers, we can run the application. When a user deletes a Customer, the behavior is exactly the same as if the Customer was physically deleted from the database. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7217.image_5F00_thumb24_5F00_770BF878.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image_thumb[24]" border="0" alt="image_thumb[24]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8304.image_5F00_thumb24_5F00_thumb_5F00_1D6DDBC4.png" width="730" height="525" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if we peek inside the actual Customer table in the database you can see them flagged correctly. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3482.image_5F00_thumb26_5F00_15E26C57.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image_thumb[26]" border="0" alt="image_thumb[26]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8787.image_5F00_thumb26_5F00_thumb_5F00_43638C1A.png" width="471" height="252" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, now when we write a query where Customers is not the direct target, the row filtering will still apply. For instance, we have a parent table called Regions. If we wanted to create a query “Regions Over 10 Customers” we would write our query like so:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;Private Sub &lt;/span&gt;RegionsOver10Customers_PreprocessQuery(&lt;span style="color: blue;"&gt;ByRef &lt;/span&gt;query &lt;span style="color: blue;"&gt;As &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;IQueryable&lt;/span&gt;(&lt;span style="color: blue;"&gt;Of &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Region&lt;/span&gt;))
    query = &lt;span style="color: blue;"&gt;From &lt;/span&gt;r &lt;span style="color: blue;"&gt;In &lt;/span&gt;query
            &lt;span style="color: blue;"&gt;Where &lt;/span&gt;r.Customers.Count &amp;gt; 10
&lt;span style="color: blue;"&gt;End Sub
&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;In LightSwitch V1 the additional filter in the &lt;em&gt;Customers_All_PreProcessQuery&lt;/em&gt; would not be called when we executed this query. It would include the count of the Customers flagged IsDeleted – which isn’t what we want. You would have to include that filter in this query as well. So if you had a lot of queries in your application that indirectly reference the Customer, then this could get difficult to maintain. In LightSwitch V2 the Customers_Filter method is always called anytime the Customer entity set is referenced, regardless if it is the direct target of a query or not, so this query would always return the expected results.&lt;/p&gt;

&lt;p&gt;Because we want to encourage using this approach to achieve true row level filtering, for new LightSwitch V2 projects there is no entry point for &lt;strong&gt;&lt;em&gt;EntitySet&lt;/em&gt;_All&lt;/strong&gt;_PreProcessQuery methods anymore. With upgraded projects from V1 they will still run the same as before and you will see them as modeled queries in the Solution Explorer. So there are no breaking changes to your application, but you will want to strongly consider using the entity set Filter methods instead. &lt;/p&gt;

&lt;h3&gt;Wrap Up&lt;/h3&gt;

&lt;p&gt;I hope this post has demonstrated how powerful and simple LightSwitch can be when working with data in the save and query pipelines. We’ve beefed up the global filtering technique so that it can handle scenarios like I showed above as well as &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/17/filtering-data-using-entity-set-filters-michael-simons.aspx" target="_blank"&gt;row level security scenarios Michael demonstrated&lt;/a&gt;. If you were using the _All_PreProcessQuery methods, then they will continue to run when you upgrade to Visual Studio 11. However you should be using the entity set Filter methods instead for applying global filters that will run no matter how the entities are accessed. &lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10297839" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Data/">Data</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>Working with SQL Server LocalDB in LightSwitch Projects in Visual Studio 11</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/04/19/working-with-sql-server-localdb-in-lightswitch-projects-in-visual-studio-11.aspx</link><pubDate>Thu, 19 Apr 2012 23:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10295590</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10295590</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/04/19/working-with-sql-server-localdb-in-lightswitch-projects-in-visual-studio-11.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Note: This article applies to LightSwitch in Visual Studio 11 Beta (LightSwitch V2)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;Visual Studio LightSwitch&lt;/a&gt;, when you design your data model through the &lt;a href="http://msdn.microsoft.com/en-us/library/ee256715.aspx" target="_blank"&gt;Data Designer&lt;/a&gt; you are either creating new tables or attaching to external data sources. When you create new tables, LightSwitch automatically creates them in the internal database, also known as the &lt;em&gt;Intrinsic &lt;/em&gt;database or &lt;em&gt;ApplicationData&lt;/em&gt;. In the first version of LightSwitch in Visual Studio 2010 we used SQL 2008 Express for the internal database development. Now with LightSwitch in &lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads#vs" target="_blank"&gt;Visual Studio 11&lt;/a&gt; we are using &lt;a href="http://msdn.microsoft.com/en-us/library/hh510202.aspx" target="_blank"&gt;SQL Server LocalDB&lt;/a&gt;. (Note: LocalDB is only used during development time. When you deploy your app you can choose to deploy to any version of SQL Server.)&lt;/p&gt;
&lt;p&gt;LocalDB is the new version of SQL Server Express that has a much lower memory footprint and is targeted for developers. It is installed automatically when you install Visual Studio 11. When developing LightSwitch projects, LocalDB is used in place of the SQL Server Express user instance feature (which is now deprecated). In this post I&amp;rsquo;ll show you some tricks on working with LocalDB databases in LightSwitch projects.&lt;/p&gt;
&lt;h3&gt;SQL Server Object Explorer in Visual Studio 11&lt;/h3&gt;
&lt;p&gt;In Visual Studio 2010 you used the Server Explorer to access your SQL Express databases. Server Explorer still exists in Visual Studio 11, but there is a new window called the &lt;a href="http://msdn.microsoft.com/en-us/library/87sfaezs(VS.110).aspx" target="_blank"&gt;SQL Server Object Explorer&lt;/a&gt; that you can use to work with your LocalDB. SQL Server Object Explorer provides a view of your database objects that&amp;rsquo;s similar to SQL Server Management Studio.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0020.image_5F00_2942455D.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1665.image_5F00_thumb_5F00_21B6D5F0.png" width="286" height="160" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To connect to your LocalDB click the &amp;ldquo;Add SQL Server&amp;rdquo; button on the toolbar to bring up the connection dialog. The server name is: &lt;strong&gt;&lt;span style="font-family: Courier New;" face="Courier New"&gt;(localdb)\v11.0&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4885.image_5F00_4165AFB8.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1830.image_5F00_thumb_5F00_6EE6CF7B.png" width="425" height="321" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once you debug (F5) your LightSwitch project the first time, the internal ApplicationData database will show up under the Databases node. LocalDB will auto attach to the database the first time it is accessed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;IMPORTANT NOTE: &lt;/strong&gt;If you are developing only new tables in a LightSwitch project, you should never need to use this window because you model your data through the LightSwitch Data Designer. In fact, if you modify the schema of the internal database outside of the Data Designer, then the LightSwitch model will get out of sync and you will get errors running the application. I REPEAT, DO NOT MODIFY YOUR INTERNAL DATABASE OUTSIDE THE LIGHTSWITCH DATA DESIGNER.&lt;/p&gt;
&lt;p&gt;However, the SQL Server Object Explorer is very handy for working with external databases that you want to bring into your LightSwitch application. During development it is common to work with a local copy of your external databases and SQL Server Object Explorer is a handy way to manage these. One of my favorite features is the schema compare. For more information on the capabilities of the SQL Server Object Explorer please see: &lt;a href="http://msdn.microsoft.com/en-us/library/87sfaezs(VS.110).aspx"&gt;What's New for Data Application Development in Visual Studio 11 Beta&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Keep in mind that external databases are just that -- they are external to LightSwitch. So you must manage their schema and deployment completely outside of the LightSwitch development environment. For more information on connecting to external data sources see - &lt;a href="http://msdn.microsoft.com/en-us/library/ff852017(VS.110).aspx" target="_blank"&gt;How to: Connect to Data&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Attaching Databases to LocalDB using SQL Server Object Explorer&lt;/h3&gt;
&lt;p&gt;With a lot of samples out there in all sorts of versions of SQL Server this feature comes in handy: you can attach to a database file (.MDF) and it will automatically upgrade your database to the current version and attach it to your LocalDB instance. This makes it easier to connect to and develop against external databases in LightSwitch. (Note that if you upgrade the database, it will no longer be compatible with earlier versions of SQL Server.)&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s take an example.&lt;/p&gt;
&lt;p&gt;The AdventureWorks family of sample databases are used in many modern database examples from Microsoft today. They show off features of the latest versions of SQL Server and are maintained on CodePlex. &lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/55330" target="_blank"&gt;You can download them here.&lt;/a&gt; There is a simpler database included here called AdventureWorksLT (AdventureWorks &amp;ldquo;Light&amp;rdquo;) that is better for developers learning data since it has a simpler schema.&lt;/p&gt;
&lt;p&gt;To attach the AdventureworksLT database:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;After you download the &lt;a href="http://msftdbprodsamples.codeplex.com/releases/view/55330#DownloadId=354847"&gt;AdventureWorksLT2012 Data File&lt;/a&gt;, create a folder for your local databases (like C:\Data) and copy the AdventureWorksLT2012_Data.MDF file to that location.&lt;/li&gt;
&lt;li&gt;In the SQL Server Object Explorer right click on your LocalDB instance and choose &amp;ldquo;New Query&amp;hellip;&amp;rdquo; to open a new SQL Query editor. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8508.image_5F00_7284EA58.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4885.image_5F00_thumb_5F00_6E0E6991.png" width="641" height="193" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In the query editor type the following commands:
&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;USE &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;[master] &lt;br /&gt;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;GO &lt;br /&gt;CREATE DATABASE &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;[AdventureWorksLT] &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ON &lt;br /&gt;&lt;/span&gt;&lt;span style="background: white; color: gray;"&gt;( &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;FILENAME &lt;/span&gt;&lt;span style="background: white; color: gray;"&gt;= &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;N'C:\Data\AdventureWorksLT2012_Data.mdf' &lt;/span&gt;&lt;span style="background: white; color: gray;"&gt;) &lt;br /&gt;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;FOR ATTACH &lt;/span&gt;&lt;span style="background: white; color: gray;"&gt;; &lt;br /&gt;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;GO&lt;/span&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Click the execute button on the toolbar (Ctrl+Shift+E) to execute the commands. You will see a message that there was a file activation failure and that a new log file (.LDF) was generated. You may also see some upgrade messages depending on the version of your LocalDB. All normal.&lt;/li&gt;
&lt;li&gt;Refresh the Databases node in the SQL Server Object Explorer and you will now see the AdventureWorksLT database attached. You will also see any LightSwitch internal databases that you are working with. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4073.image_5F00_1F99D727.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6433.image_5F00_thumb_5F00_58448134.png" width="641" height="173" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Using the SQL query editor you can also execute other SQL scripts to create and work with your databases. However, you can also use the Server Explorer to attach to a database using a wizard which was also available in Visual Studio 2010. For more information see - &lt;a href="http://msdn.microsoft.com/en-us/library/ms239722(VS.110).aspx" target="_blank"&gt;How to: Connect to a File-based Database.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Using a LocalDB Database as an External Data Source in LightSwitch&lt;/h3&gt;
&lt;p&gt;Once you have your databases attached, it&amp;rsquo;s easy to add them as an external data source.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In the Solution Explorer for your LightSwitch project right-click on the Data Sources node and select &amp;ldquo;Add Data Source&amp;hellip;&amp;rdquo; &lt;br /&gt; &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3806.image_5F00_70D41E84.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1346.image_5F00_thumb_5F00_3E704B05.png" width="307" height="277" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;This opens the Attach Data Source wizard where you can select from a variety of external data source types. Select Database and click Next. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4786.image_5F00_250847CB.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1731.image_5F00_thumb_5F00_6B8537D3.png" width="576" height="452" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;In the Connection Properties dialog set the server name to (localdb)\v11.0 and then select the database you want. Note that here you can also attach to a database file as well. This will have the same effect as the attach steps above. &lt;br /&gt; &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2816.image_5F00_0414D524.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2705.image_5F00_thumb_5F00_638D9571.png" width="331" height="486" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;From there you can select the tables and views you want to bring into your LightSwitch application.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Syncing Schema Changes for External Data Sources&lt;/h3&gt;
&lt;p&gt;The LightSwitch Data Designer will not allow you to change the underlying schema of an external data source. Instead, you can use SQL Server Object Explorer (or any other favorite database tool) to make changes. When you modify the schema of your &lt;strong&gt;external &lt;/strong&gt;data source you need to bring those changes back into LightSwitch (remember &lt;strong&gt;do not modify your internal database &lt;/strong&gt;this way).&lt;/p&gt;
&lt;p&gt;To sync the changes, from the Solution Explorer right-click on the external data source and select &amp;ldquo;Update Datasource&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6521.image_5F00_2E14D34C.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6518.image_5F00_thumb_5F00_299E5285.png" width="307" height="336" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Choose all the tables you are using in your LightSwitch application and then click Finish and the changes will be reflected back in the Data Designer.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8171.image_5F00_345BA9DA.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3056.image_5F00_thumb_5F00_08AADFDE.png" width="743" height="451" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Wrap Up&lt;/h3&gt;
&lt;p&gt;SQL Server LocalDB uses less memory than previous versions of SQL Server Express and still provides the automatic attach of databases in order to speed up development of your data-based projects. For external databases, the SQL Server Object Explorer is a welcome addition to Visual Studio and has a similar experience to SQL Server Management Studio. However, remember that you should only make changes to your internal database (ApplicationData) via the LightSwitch Data Designer.&lt;/p&gt;
&lt;p&gt;When working with the internal database in LightSwitch, LocalDB is only used during development time. When you deploy your app that uses the internal database, you can choose to deploy to any version of SQL Server, including SQL Azure. Additionally, if you are using external data sources in your LightSwitch application, you are asked for the connection strings of the production databases upon deploy. For more information on deploying LightSwitch applications see &lt;a href="http://msdn.microsoft.com/en-us/library/ff872288(VS.110).aspx" target="_blank"&gt;Deploying LightSwitch Applications&lt;/a&gt; in the MSDN Library and my post &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/29/lightswitch-iis-deployment-enhancements-in-visual-studio-11.aspx"&gt;LightSwitch IIS Deployment Enhancements in Visual Studio 11&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://blogs.msdn.com/aggbug.aspx?PostID=10295590" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/SQL+Server/">SQL Server</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Data/">Data</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>LightSwitch Companion Client Examples using OData</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/04/17/lightswitch-companion-client-examples-using-odata.aspx</link><pubDate>Tue, 17 Apr 2012 18:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10294620</guid><dc:creator>Beth Massi</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10294620</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/04/17/lightswitch-companion-client-examples-using-odata.aspx#comments</comments><description>&lt;p&gt;&lt;img style="margin: 0px 10px 5px 0px; float: left; display: inline;" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3513.image_5F00_thumb_5F00_681635BF.png" width="384" height="264" /&gt;&lt;/p&gt;
&lt;p&gt;One of the biggest features with LightSwitch in &lt;a href="http://msdn.microsoft.com/en-us/vstudio/hh852657" target="_blank"&gt;Visual Studio 11&lt;/a&gt; is the &lt;a href="http://www.odata.org" target="_blank"&gt;Open Data Protocol&lt;/a&gt; (OData) support. OData is a standard Web protocol for exchanging data on the web which provides easy, secure access into data stores. Not only can you consume OData services in LightSwitch, the middle-tier services are also now exposed as OData service endpoints reachable by other clients. For instance, I showed how power users can &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx" target="_blank"&gt;easily perform analytics and reporting on your LightSwitch data using Excel PowerPivot&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, this also allows you to create a different UI for your LightSwitch application so that you can expose it to other platforms that aren&amp;rsquo;t supported out of the box. Furthermore, all your business rules and access control logic is preserved when calling these services. Your data models, business logic, and access control logic is where you spend the bulk of your time when building a LightSwitch application and all this work is preserved.&lt;/p&gt;
&lt;p&gt;The team has been focusing on the architecture of these services in LightSwitch as well as how to use them. Particularly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/22/lightswitch-architecture-odata.aspx"&gt;LightSwitch Architecture: OData &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/06/enhance-your-lightswitch-applications-with-odata.aspx"&gt;Enhance Your LightSwitch Applications with &lt;em&gt;OData&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx"&gt;Creating and Consuming LightSwitch &lt;em&gt;OData&lt;/em&gt; Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/05/odata-apps-in-lightswitch-part-2-matt-sampson.aspx"&gt;OData Apps in LightSwitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/13/using-lightswitch-odata-services-in-a-windows-8-metro-style-application-elizabeth-maher.aspx"&gt;Using LightSwitch OData Services in a Windows 8 &lt;em&gt;Metro&lt;/em&gt; Style Application &lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The community has taken these examples even further. I&amp;rsquo;d like to call out Michael Washington who runs the &lt;a href="http://www.LightSwitchHelpWebsite.com"&gt;www.LightSwitchHelpWebsite.com&lt;/a&gt; where he&amp;rsquo;s been on fire recently posting examples of companion clients. Check these out!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/128/A-Full-CRUD-DataJs-and-KnockoutJs-LightSwitch-Example-Using-Only-An-Html-Page.aspx"&gt;A Full CRUD DataJs and KnockoutJs LightSwitch Example Using Only An .Html Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/126/A-Full-CRUD-LightSwitch-JQuery-Mobile-Application.aspx"&gt;A Full CRUD LightSwitch JQuery Mobile Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/125/Communicating-With-LightSwitch-Using-Android-App-Inventor.aspx"&gt;Communicating With LightSwitch Using Android App Inventor&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="http://janvanderhaegen.wordpress.com/" target="_blank"&gt;Jan van der Haegen&lt;/a&gt; also wrote a great MSDN Article last month using a WIndows Phone 7 client:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/magazine/hh875176.aspx"&gt;Consume a LightSwitch OData Service from a Windows Phone application&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Opening up the middle-tier services was a major goal for LightSwitch and you can see why &amp;ndash; it allows you to exchange data easily with other systems and clients over the Web. I&amp;rsquo;m excited to see what the community comes up with next!&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10294620" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/OData/">OData</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>MSDN Webcast: What's New with LightSwitch in Visual Studio 11</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/04/11/msdn-webcast-what-s-new-with-lightswitch-in-visual-studio-11.aspx</link><pubDate>Wed, 11 Apr 2012 17:55:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10292775</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10292775</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/04/11/msdn-webcast-what-s-new-with-lightswitch-in-visual-studio-11.aspx#comments</comments><description>&lt;p&gt;Join me next month as I take you on a tour of the new features of LightSwitch in &lt;a href="http://go.microsoft.com/fwlink/?LinkId=240160" target="_blank"&gt;Visual Studio 11&lt;/a&gt;. &lt;/p&gt;  &lt;h3&gt;&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032510992&amp;amp;Culture=en-US" target="_blank"&gt;What's New with LightSwitch in Visual Studio 11&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;Friday, May 11, 2012 1:00 PM Pacific Time&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Microsoft Visual Studio LightSwitch is the simplest way to build business applications and data services for the desktop and the cloud. LightSwitch contains several new features and enhanced capabilities in Visual Studio 11. In this demonstration-heavy webcast, we walk through the major new features, such as creating and consuming OData services, new controls and formatting, new features with the security system and deployment, and much more.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032510992&amp;amp;Culture=en-US" target="_blank"&gt;Register here.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hope you can join this webcast, it should be a lot of fun! In the meantime, enjoy some of these &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh852657" target="_blank"&gt;LightSwitch in Visual Studio 11 resources&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Articles:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/06/enhance-your-lightswitch-applications-with-odata-beth-massi.aspx"&gt;Enhance Your LightSwitch Applications with OData &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services-beth-massi.aspx"&gt;Creating and Consuming LightSwitch OData Services &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/22/lightswitch-architecture-odata.aspx"&gt;LightSwitch Architecture: OData &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/28/new-business-types-percent-amp-web-address-andrew-lader.aspx"&gt;New Business Types: Percent &amp;amp; Web Address &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/11/ui-design-improvements-part-1-formatting-numeric-data-andrew-lader.aspx"&gt;New Formatting Support in LightSwitch &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/04/03/active-directory-group-support-matt-thalman.aspx"&gt;Active Directory Group Support &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/29/lightswitch-iis-deployment-enhancements-in-visual-studio-11.aspx"&gt;LightSwitch IIS Deployment Enhancements in Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/30/tips-on-upgrading-your-lightswitch-applications-to-visual-studio-11-beta.aspx"&gt;Tips on Upgrading Your LightSwitch Applications to Visual Studio 11 Beta &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;More articles coming out every week on the &lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;LightSwitch Team Blog&lt;/a&gt;! &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Featured Extensions:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=8c22c029-204b-4352-9dbb-60e9dec3e7b8&amp;amp;title=LightSwitch+Cosmopolitan+Shell+and+Theme&amp;amp;uri=http%3a%2f%2fvisualstudiogallery.msdn.microsoft.com%2fdc25522b-4a60-4f19-a5f8-bdec898f6599%3fSRC%3dFeatured&amp;amp;k=6%2fIwjcy8cxzLRWCJ3bGDfCQMjaGNc%2f3uWwYJ8P8z%2fY8%3d"&gt;LightSwitch Cosmopolitan Shell and Theme&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=7606223a-e5aa-47b8-b268-f34d2a393deb&amp;amp;title=LightSwitch+Extensibility+Toolkit+for+Visual+Studio+11+Beta&amp;amp;uri=http%3a%2f%2fvisualstudiogallery.msdn.microsoft.com%2f2381b03b-5c71-4847-a58e-5cfa48d418dc&amp;amp;k=W12tiNMW4GpkyxzENjvNlorqPB5qF1lfkJ828klZxG0%3d"&gt;LightSwitch Extensibility Toolkit for Visual Studio 11 Beta&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?f%5B0%5D.Type=VisualStudioVersion&amp;amp;f%5B0%5D.Value=VSLS&amp;amp;f%5B0%5D.Text=Visual%20Studio%20LightSwitch" target="_blank"&gt;More here&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Featured Samples:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=61053332-676c-4300-837d-62c1cf71a97f&amp;amp;title=Vision+Clinic+Walkthrough+%26+Sample&amp;amp;uri=http%3a%2f%2fcode.msdn.microsoft.com%2fLightSwitch-in-Visual-bca65069&amp;amp;k=5EMSd2vBybS7umEOutbLDui%2fOyQJ%2fCy8MDOZARliEkI%3d"&gt;Vision Clinic Walkthrough &amp;amp; Sample&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=72cf874c-ea1b-4ee6-bfe9-dff9a4006a50&amp;amp;title=Contoso+Construction+-+LightSwitch+Advanced+Sample+(Visual+Studio+11+Beta)&amp;amp;uri=http%3a%2f%2fcode.msdn.microsoft.com%2fContoso-Construction-338952fd&amp;amp;k=m%2fZFNExe8AZ0QLQ1xA2gp%2bI4pwRWGmljbIQ6iW%2bi4dQ%3d"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=Technology&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date" target="_blank"&gt;More here&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Community:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=b0be3dad-4dfa-4be5-816d-fbd5625696f5&amp;amp;title=LightSwitch+in+Visual+Studio+11+Beta+Forum&amp;amp;uri=http%3a%2f%2fsocial.msdn.microsoft.com%2fForums%2fen-US%2fLightSwitchDev11Beta%2fthreads&amp;amp;k=MrQNx5lshBDWEEEWJlV8hEIpDwL8KQA10HdwbrF4QjE%3d"&gt;LightSwitch in Visual Studio 11 Beta Forum&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="https://connect.microsoft.com/lightswitch" target="_blank"&gt;LightSwitch Product Feedback&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;LightSwitch Team Blog&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a title="LightSwitch on Facebook" href="http://www.facebook.com/pages/Visual-Studio-LightSwitch/151211271561073"&gt;LightSwitch on Facebook&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a title="LightSwitch on Twitter" href="http://twitter.com/VSLightSwitch"&gt;LightSwitch on Twitter&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;You can find all of this &lt;strong&gt;plus more &lt;/strong&gt;on the &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh852657" target="_blank"&gt;LightSwitch Developer Center&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;That should keep you busy until the webcast next month &lt;img style="style" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5141.wlEmoticon_2D00_winkingsmile_5F00_2AE865F9.png" /&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10292775" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Speaking/">Speaking</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Webcast/">Webcast</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>LightSwitch Community &amp; Content Rollup–March 2012</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/04/03/lightswitch-community-amp-content-rollup-march-2012.aspx</link><pubDate>Tue, 03 Apr 2012 14:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10290148</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10290148</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/04/03/lightswitch-community-amp-content-rollup-march-2012.aspx#comments</comments><description>&lt;p&gt;Last Fall I started posting a rollup of interesting community happenings, content, samples and extensions popping up around &lt;a href="http://msdn.com/lightswitch"&gt;Visual Studio LightSwitch&lt;/a&gt;. If you missed those rollups you can check them all out here: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/tags/rollup/" target="_blank"&gt;LightSwitch Community &amp;amp; Content Rollups&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;March was filled with a flurry of content around Visual Studio 11 Beta since it was released on February 29th. If you haven’t done so already, I encourage you to download it and give it a spin.&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=240162"&gt;Download Visual Studio 11 Beta&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;You can provide general feedback using the &lt;a href="http://visualstudio.uservoice.com/forums/121579-visual-studio" target="_blank"&gt;Visual Studio UserVoice&lt;/a&gt; site and LightSwitch-specific feedback on the &lt;a href="http://visualstudio.uservoice.com/forums/127959-visual-studio-lightswitch" target="_blank"&gt;LightSwitch UserVoice site&lt;/a&gt;. There are also a handful of &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/vsvnext" target="_blank"&gt;Beta forums&lt;/a&gt; you can use to ask questions in particular areas, including the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/LightSwitchDev11Beta/threads"&gt;LightSwitch in Visual Studio 11 Beta Forum&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;LightSwitch Beta Resources on the Developer Center&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://bit.ly/LightSwitchDev11"&gt;&lt;img style="margin: 0px 12px 0px 0px;" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5315.image_5F00_11ACECA6.png" width="104" height="109" /&gt;&lt;/a&gt;If you haven’t noticed the LightSwitch team has been releasing a lot of good content around the next version of LightSwitch in Visual Studio 11. We’ve created a page on the &lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt; with a list of key Beta resources for you. Check back to the page often as we add more content each week! Here’s the easy-to-remember URL:&lt;/p&gt;  &lt;h4&gt;&lt;a href="http://bit.ly/LightSwitchDev11"&gt;http://bit.ly/LightSwitchDev11&lt;/a&gt;&lt;/h4&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;New Cosmopolitan Shell &amp;amp; Theme &lt;/h3&gt;  &lt;p&gt;In March the team released the beta version of the &lt;i&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/15/lightswitch-cosmopolitan-shell-and-theme-for-visual-studio-11-beta-released.aspx" target="_blank"&gt;LightSwitch Cosmopolitan Shell and Theme&lt;/a&gt;&lt;/i&gt; extension for Visual Studio 11 Beta.&amp;#160; &lt;/p&gt;  &lt;p&gt;We drew inspiration from the Silverlight Cosmopolitan theme in designing the extension. The shell and theme provide a modern UI to achieve a more immersive feel, simple and clean styling for the controls, corporate/product branding, as well as many other improvements. This shell will become the default shell for new LightSwitch projects developed with Visual Studio 11. Check out these screen shots and give it a spin! (click to enlarge). You can provide feedback and report issues with the shell in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/LightSwitchDev11Beta/threads" target="_blank"&gt;Beta forum&lt;/a&gt; or directly on the &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/15/lightswitch-cosmopolitan-shell-and-theme-for-visual-studio-11-beta-released.aspx" target="_blank"&gt;LightSwitch Team blog post&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-73-metablogapi/0576.image6_5F00_2A488508.png" target="_blank"&gt;&lt;img title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-73-metablogapi/4466.image6_5F00_thumb_5F00_10744ED9.png" width="279" height="227" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5633.Contoso2_5F00_5D41F6F7.png"&gt;&lt;img title="Contoso2" border="0" alt="Contoso2" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2313.Contoso2_5F00_thumb_5F00_75656152.png" width="292" height="227" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;New Extensibility Toolkit &amp;amp; Samples Released&lt;/h3&gt;  &lt;p&gt;An updated version of the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/2381b03b-5c71-4847-a58e-5cfa48d418dc" target="_blank"&gt;LightSwitch Extensibility Toolkit for Visual Studio 11 Beta&lt;/a&gt; was also released in March. This toolkit refresh provides project types for creating new LightSwitch Extension Libraries using Visual Studio 11 beta and includes templates for creating all the different types of supported LightSwitch extensions. If you’re building LightSwitch extensions then you’ll want to check out this release. &lt;/p&gt;  &lt;p&gt;Along with this release are updated versions of all the extensibility samples.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-Value-Control-da6bab3b"&gt;LightSwitch Value Control Extension Sample for Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-Stack-Panel-22359289"&gt;LightSwitch Stack Panel Control Extension Sample for Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-Metro-Theme-7424397b"&gt;LightSwitch Metro Theme Extension Sample for Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-Smart-Layout-3157ea11"&gt;LightSwitch Smart Layout Control Extension Sample for Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-Business-Type-cde95e6f"&gt;LightSwitch Business Type Extension Sample for Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-Screen-dcb81410"&gt;LightSwitch Screen Template Extension Sample for Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-Shell-97f61751"&gt;LightSwitch Shell Extension Sample for Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-Detail-Control-a0b2e981"&gt;LightSwitch Detail Control Extension Sample for Visual Studio 11&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;LightSwitch Community Rock Stars&lt;/h3&gt;  &lt;p&gt;If you’ve been spending any time developing LightSwitch applications and listening to the #LightSwitch hash tag on twitter, hanging out in the forums, or searching the internet for LightSwitch content, then you probably have run across these people at one time or another. These folks constantly pop up in our community channels – some have been helping the LightSwitch community since the early betas and some are emerging recently. These are just a few of the LightSwitch rock stars to definitely keep an eye on. &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://community.visual-basic.it/Alessandro/default.aspx"&gt;Alessandro Del Sole&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/"&gt;Jan Van der Haegen&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://dotnetlore.com/"&gt;Jewel Lambert&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://exploringlightswitch.blogspot.com/" target="_blank"&gt;Keith Craigo&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Home.aspx" target="_blank"&gt;Michael Washington&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.paulspatterson.com/"&gt;Paul Patterson&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://social.msdn.microsoft.com/profile/plusorminus/?type=forum" target="_blank"&gt;PlusOrMinus&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://spasol.wordpress.com/" target="_blank"&gt;Spaso Lazarevic&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://social.msdn.microsoft.com/Profile/yann%20duran" target="_blank"&gt;Yann Duran&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Have more folks to recommend? Post a comment below!&lt;/p&gt;  &lt;h3&gt;New LightSwitch MSDN Magazine Column: &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/magazine/hh875176.aspx"&gt;Leading LightSwitch&lt;/a&gt;&lt;/strong&gt;&lt;/h3&gt;  &lt;p&gt;&lt;strong&gt;&lt;a href="http://msdn.microsoft.com/hh882439.aspx"&gt;&lt;img style="margin: 0px 20px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" title="April 2012" border="0" alt="April 2012" align="left" src="http://i.msdn.microsoft.com/hh882439.cover_lrg(en-us,MSDN.10).png" width="86" height="115" /&gt;&lt;/a&gt;&lt;/strong&gt;One of our LightSwitch rock stars has started a new column on MSDN Magazine! &lt;a href="http://janvanderhaegen.wordpress.com/" target="_blank"&gt;Jan van der Haegen&lt;/a&gt; released his first “Leading LightSwitch” column in the March issue. I’m really looking forward to the great stuff Jan will teach us!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/magazine/hh875176.aspx"&gt;Consume a LightSwitch OData Service from a Windows Phone Application&lt;/a&gt;    &lt;br /&gt;&lt;em&gt;Jan Van der Haegen's first LightSwitch column explores one of the key features added in the beta release of the tool--the ability to create and consume OData services, which can in turn be consumed from any client, including custom Windows Phone applications. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Notable Content this Month&lt;/h3&gt;  &lt;p&gt;Lots of content has been streaming out from folks all over the internet. I’m also excited by the number of extensions the community released this month, nice! Here’s some more notable resources I found. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Extensions (&lt;/strong&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date"&gt;see all 81 of them here!&lt;/a&gt;&lt;strong&gt;):&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/7863f2f0-6ed6-4f03-8619-c5a89b2fd863"&gt;ComponentOne FlexGrid for LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/bc82d59e-ec40-4cfe-824d-c4ccd65d53d6"&gt;DockShell - LightSwitch Shell Extension &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/3e3de735-2112-47c2-a5ed-7ed96bf971ad"&gt;Excel Data Provider for LightSwitch &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/02/lightswitch-filter-control-for-visual-studio-11-beta.aspx"&gt;LightSwitch Filter Control For Visual Studio 11 Beta&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/dc25522b-4a60-4f19-a5f8-bdec898f6599"&gt;LightSwitch Cosmopolitan Shell and Theme &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/8719e4c4-6689-4c1b-bf62-c95896275208"&gt;MicroApplications LightSwitch Business Types&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/24709dcb-d7df-49af-82ba-dc08b3bdbb38"&gt;PaulozziCo.MetroShell &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/80d70c84-0c35-4e55-9575-a0e4b76abe1b"&gt;SAP ADO.NET Data Provider &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;More Samples (&lt;a href="http://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=Technology&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date" target="_blank"&gt;see all of them here&lt;/a&gt;):&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/LightSwitch-in-Visual-bca65069"&gt;Vision Clinic Walkthrough &amp;amp; Sample (Visual Studio 11 Beta&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Team Articles:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio 11 Beta (LightSwitch V2)&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx"&gt;Creating and Consuming LightSwitch OData Services&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/20/odata-applications-in-lightswitch-for-visual-studio-11-beta-matt-sampson.aspx"&gt;Creating a LightSwitch Application Using the Commuter OData Service&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/06/enhance-your-lightswitch-applications-with-odata-beth-massi.aspx"&gt;Enhance Your LightSwitch Applications with OData &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/22/lightswitch-architecture-odata.aspx" target="_blank"&gt;LightSwitch Architecture: OData&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/29/lightswitch-iis-deployment-enhancements-in-visual-studio-11.aspx"&gt;LightSwitch IIS Deployment Enhancements in Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/28/new-business-types-percent-amp-web-address-andrew-lader.aspx"&gt;New Business Types: Percent &amp;amp; Web Address &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/30/tips-on-upgrading-your-lightswitch-applications-to-visual-studio-11-beta.aspx"&gt;Tips on Upgrading Your LightSwitch Applications to Visual Studio 11 Beta &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/13/using-lightswitch-odata-services-in-a-windows-8-metro-style-application-elizabeth-maher.aspx"&gt;Using LightSwitch OData Services in a Windows 8 Metro Style Application &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Visual Studio LightSwitch (LightSwitch V1)&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/23/deploying-lightswitch-applications-to-iis6-amp-automating-deployment-packages.aspx"&gt;Deploying LightSwitch Applications to IIS6 &amp;amp; Automating Deployment Packages&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/mthalman/archive/2012/03/15/using-the-securitydata-service-in-lightswitch.aspx"&gt;Using the SecurityData service in LightSwitch&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Community Content:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/114/Accessing-Your-Visual-Studio-2011-LightSwitch-Application-Using-OData.aspx"&gt;Accessing Your Visual Studio 2011 LightSwitch Application Using OData&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/119/An-Interview-With-Alessandro-Del-Sole-Author-of-LightSwitch-Unleashed.aspx"&gt;An Interview With Alessandro Del Sole (Author of LightSwitch Unleashed)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/122/Calling-LightSwitch-2011-OData-Using-Server-Side-Code.aspx" target="_blank"&gt;Calling LightSwitch 2011 OData Using Server Side Code&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://dotnetlore.com/changing-the-numeric-keypad-period-to-a-comma/"&gt;Changing the Numeric Keypad Period to a Comma&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/123/CLASS-Extensions-Version-2-Released.aspx"&gt;CLASS Extensions Version 2 Released&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/120/Fix-Installing-Extensions-In-LightSwitch-When-You-Also-Have-LightSwitch-Beta-2011.aspx"&gt;Fix: Installing Extensions In LightSwitch When You Also Have LightSwitch Beta 2011&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://dotnetlore.com/how-can-i-display-the-version-number-of-the-currently-running-lightswitch-application/"&gt;How Can I Display the Version Number of the Currently Running LightSwitch Application?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://dotnetlore.com/how-do-i-prevent-a-column-in-a-grid-from-gaining-focus/"&gt;How Do I Prevent a Column in a Grid From Gaining Focus?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://dotnetlore.com/57/"&gt;How To Add an Application Logo Background Similar To the Feature Dropped After Beta&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;b&gt;&lt;a href="http://dotnetlore.com/how-to-use-previously-out-of-browser-only-features-in-lightswitch-for-in-browser-apps-with-vs-11-beta/" target="_blank"&gt;How to use previously Out-of-Browser-only features in LightSwitch for In-Browser Apps with VS11 Beta&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://spasol.wordpress.com/2012/03/24/im-speaking-at-ms-network-2-0/"&gt;I’m speaking at MS NetWork 2.0&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/117/Installing-LightSwitch-Themes-and-Shells-built-for-LightSwitch-v1-into-the-LightSwitch-in-Visual-Studio-11-Beta-LightSwitch-v2.aspx"&gt;Installing LightSwitch Themes and Shells built for LightSwitch v1 into the LightSwitch in Visual Studio 11 Beta (LightSwitch v2)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/118/Learn-How-To-Make-OData-Calls-In-LightSwitch-2011.aspx"&gt;Learn How To Make OData Calls In LightSwitch 2011&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://community.visual-basic.it/AlessandroEnglish/archive/2012/03/26/LightSwitch-reading-threads-from-StackOverflow-with-OData.aspx"&gt;LightSwitch: reading threads from StackOverflow with OData&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.paulspatterson.com/technology/lightswitch/reporting-and-printingsuccess/" target="_blank"&gt;Microsoft LightSwitch – 8 Ways to Reporting and Printing Success&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.paulspatterson.com/technology/lightswitch/microsoft-lightswitch-consuming-odat/" target="_blank"&gt;Microsoft LightSwitch – Consuming OData&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/03/12/monthly-lightswitch-column-in-msdn-magazine-and-other-all-things-lightswitch/"&gt;Monthly LightSwitch column in MSDN Magazine, and other “all things LightSwitch”…&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://dotnetlore.com/notification-toast-for-in-browser-lightswitch-apps-using-growl-for-windows/"&gt;Notification “Toast” For In-Browser LightSwitch Apps Using Growl For Windows&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.paulspatterson.com/miscellaneous/citizendeveloperslidedeck/"&gt;Rise of the Citizen Developer – Slide Deck and Speaker Notes&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/03/27/switchtory-turn-on-the-innovation/"&gt;switchtory – turn on the innovation&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;LightSwitch Team Community Sites&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.facebook.com/vslightswitch"&gt;&lt;img style="margin: 0px 10px 20px 0px;" border="0" alt="" align="left" src="http://badge.facebook.com/badge/151211271561073.1904.953280091.png" width="137" height="84" /&gt;&lt;/a&gt; Become a fan of &lt;a href="http://www.facebook.com/vslightswitch"&gt;Visual Studio LightSwitch on Facebook&lt;/a&gt;. Have fun and interact with us on our wall. Check out the cool stories and resources. Here are some other places you can find the LightSwitch team:     &lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/vslightswitch"&gt;LightSwitch MSDN Forums&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/lightswitch"&gt;LightSwitch Team Blog&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://twitter.com/#!/VSLightSwitch"&gt;LightSwitch on Twitter&lt;/a&gt; (@VSLightSwitch, #VisualStudio #LightSwitch) &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10290148" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Rollup/">Rollup</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>LightSwitch IIS Deployment Enhancements in Visual Studio 11</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/03/29/lightswitch-iis-deployment-enhancements-in-visual-studio-11.aspx</link><pubDate>Thu, 29 Mar 2012 13:48:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10288661</guid><dc:creator>Beth Massi</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10288661</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/03/29/lightswitch-iis-deployment-enhancements-in-visual-studio-11.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Note: This information applies to LightSwitch in Visual Studio 11 Beta ONLY (LightSwitch V2). &lt;/strong&gt;For information on deploying LightSwitch applications built with Visual Studio 2010 (LightSwitch V1), please see: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx"&gt;Deployment Guide: How to Configure a Web Server to Host LightSwitch Applications&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/23/deploying-lightswitch-applications-to-iis6-amp-automating-deployment-packages.aspx" target="_blank"&gt;In my last post on deployment&lt;/a&gt; I mentioned I’d point out some LightSwitch deployment goodies you get in &lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads#vs" target="_blank"&gt;Visual Studio 11 Beta&lt;/a&gt;. Last week I was knee deep in IIS6 and 7 deployment and I discovered some nice improvements in Visual Studio 11 that I’d like to discuss. First off, I want to mention that this is a Beta so details may change. However, I think it’s important to point out some of the changes that you see when you deploy your LightSwitch V2 applications to your own web servers. I’m not going to discuss Azure deployment (yet) as we’re still making improvements in this area. This post will focus on IIS deployment only. &lt;/p&gt;  &lt;h3&gt;Setting up IIS&lt;/h3&gt;  &lt;p&gt;For the most part, deployment is the same as it was before, albeit with a few nice new features I’ll discuss below. So you can set up your web and SQL servers exactly the same as before. For information on setting up your web servers see:&lt;/p&gt;  &lt;p&gt;For IIS7: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx"&gt;Deployment Guide: How to Configure a Web Server to Host LightSwitch Applications&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For IIS6: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/23/deploying-lightswitch-applications-to-iis6-amp-automating-deployment-packages.aspx"&gt;Deploying LightSwitch Applications to IIS6 &amp;amp; Automating Deployment Packages&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What’s really nice is that you can deploy LightSwitch V2 applications (built with Visual Studio 11 Beta) to any web server you set up using the V1 LightSwitch 2011 Server Runtime prerequisites. Additionally, when we release the final (RTM) version of LightSwitch V2, you will no longer need the LightSwitch server prerequisites or any LightSwitch specific tools. The same Web Platform Installer feed used by the rest of Visual Studio web applications will also work for LightSwitch applications. This reduces the numbers of steps to provision a server and should make deployment a lot more predictable. Read on to see what else we improved…&lt;/p&gt;  &lt;h3&gt;Import Settings&lt;/h3&gt;  &lt;p&gt;The first new feature you will notice on the publishing wizard is a button which allows you to import a .PublishSettings file to configure the deployment. Webmatrix and Web Application projects in Visual Studio also have this feature. Some ISPs/hosters will give you this file to make it easy to deploy to their systems. For more information on creating these files yourself see: &lt;a href="http://learn.iis.net/page.aspx/980/generate-a-profile-xml-file/" target="_blank"&gt;IIS.NET: Generate a Profile XML File.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0572.image_5F00_66C6143B.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3107.image_5F00_thumb_5F00_43A57CFE.png" width="641" height="457" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Your Choice: Publish Database Schema&lt;/h3&gt;  &lt;p&gt;Another new feature is the ability to choose whether you want to publish the database schema when you do a direct deployment (on the Publish Output step you select “Remotely publish to server now”). When you configure your database connections you will now see a checkbox that indicates whether LightSwitch should attempt to update the schema too. So if you are updating your application but you didn’t make any schema changes in the data designer, then you can uncheck this box to speed up the deployment. However, be careful –&lt;strong&gt; if you are unsure leave this box checked.&lt;/strong&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7888.image_5F00_49EC538C.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2526.image_5F00_thumb_5F00_57526692.png" width="641" height="453" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Additionally, if you are generating a package on disk (on the Publish Output step you select “Generate a package on disk”) you can also choose whether you want to generate the SQL database script as part of the package. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1537.image_5F00_01BE97B0.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4657.image_5F00_thumb_5F00_7628DA70.png" width="641" height="454" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Generating and Installing Deployment Packages&lt;/h3&gt;  &lt;p&gt;When you choose to create a deployment package on disk instead of direct deployment, a package .ZIP file is created for you that you can import into IIS. In IIS7 you can import this package using IIS Manager, right-clicking on the Default Web Site and then selecting Deploy –&amp;gt; Import Application &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx" target="_blank"&gt;as detailed in the deployment guide&lt;/a&gt;. This process will prompt you for all the required parameters to install the package and set up the database. However in IIS6 you need to use the command line to import these, as I showed in &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/23/deploying-lightswitch-applications-to-iis6-amp-automating-deployment-packages.aspx" target="_blank"&gt;my last deployment post&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;In LightSwitch V2 there are now also a set of files that you can use to automate the importing of the package and specifying parameters via the command line. These are starting points and should be modified as necessary depending on your settings. Administrators can use these to get the right settings together quickly instead of having to manually create these files. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4263.image_5F00_59ABE890.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6327.image_5F00_thumb_5F00_6E31380E.png" width="324" height="218" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you open up the readme it will detail the prerequisites and how to use the batch file. It is similar to the settings I detailed in the previous deployment post (which only dealt with V1 applications). Here are the V2 specific settings in the .SetParameters.xml. (Note that there is a Beta bug where you will see three additional internal parameters, “dbFullSql_Path”, “Update web.config connection string”, and “LightSwitchApplication_Path” so you will need to remove these lines if you see them). &lt;/p&gt;  &lt;p&gt;Modify the following settings &lt;strong&gt;in bold &lt;/strong&gt;to your specific values:&amp;#160; &lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;xml &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;version&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;1.0&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;encoding&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;utf-8&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;parameters&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseAdministratorConnectionString&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; 
                &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;Data Source=&lt;em&gt;&lt;font color="#000000"&gt;servername\SQLEXPRESS&lt;/font&gt;&lt;/em&gt;;Initial Catalog=&lt;font color="#000000"&gt;&lt;em&gt;Application1&lt;/em&gt;&lt;/font&gt;;
                       User ID=&lt;em&gt;&lt;font color="#000000"&gt;admin&lt;/font&gt;&lt;/em&gt;;Password=&lt;em&gt;&lt;font color="#000000"&gt;adminPassword&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseServer&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#000000"&gt;servername\SQLEXPRESS&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseName&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application1&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseUserName&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#000000"&gt;dbuser&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseUserPassword&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;&lt;em&gt;&lt;font color="#000000"&gt;dbpassword&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
 &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application1_IisWebApplication&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Default Web Site/Application1&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
 &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;parameters&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Note that the DatabaseAdministratorConnectionString is only used to create/update the database. The DatabaseUserName and DatabaseUserPassword values are used to construct the connection string in the web.config and is the credential used by the LightSwitch middle-tier when your app is running. &lt;/p&gt;

&lt;p&gt;If your application is using Windows authentication you will need to specify one additional parameter:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application Administrator User Name&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;strong&gt;&lt;em&gt;DOMAIN\UserName&lt;/em&gt;&lt;/strong&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;If your application is using Forms authentication you will need to specify three additional parameters:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application Administrator User Name&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;strong&gt;&lt;em&gt;UserName&lt;/em&gt;&lt;/strong&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application Administrator Full Name&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;em&gt;&lt;strong&gt;Full Name&lt;/strong&gt;&lt;/em&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application Administrator Password&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;strong&gt;&lt;em&gt;strongPassword&lt;/em&gt;&lt;/strong&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Once you configure the .SetParameters.xml file, copy the .zip, .cmd and .xml files to the web server where you are the administrator and run the .Deploy.cmd. To install the package and the database run:&lt;/p&gt;

&lt;p&gt;&amp;gt;&lt;strong&gt;Application1.Deploy.cmd /Y&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;See the readme for details on more options. &lt;/p&gt;

&lt;h3&gt;Setting up the System Administrator User&lt;/h3&gt;

&lt;p&gt;In LightSwitch V1 when you select to use either Forms or Windows authentication, the deployment wizard would ask for the credentials of the System Administrator that should be in the database initially and then after it deployed the database it would call Microsoft.LightSwitch.SecurityAdmin.exe (which is installed with the runtime prerequisites) to insert the corresponding records into the database at that time. &lt;/p&gt;

&lt;p&gt;Now the System Administrator credentials you enter in the wizard are stamped in web.config. So now when your application starts the first time, LightSwitch looks to see if that user exists in the database and if it doesn’t, it will be created. This strategy works even when the LightSwitch runtime prerequisites are not installed. So now if you ever need to “reset” the admin password, you can modify web.config – either directly or via re-publish. If you look in the published web.config you will see these new keys:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;    &amp;lt;!-- &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;If no admin user exists, create an admin user with this user name &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;--&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;add &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;key&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Microsoft.LightSwitch.Admin.UserName&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;strong&gt;&lt;em&gt;UserName&lt;/em&gt;&lt;/strong&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
    &amp;lt;!-- &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;When creating an admin user with Forms auth, use this as the full name &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;--&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;add &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;key&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Microsoft.LightSwitch.Admin.FullName&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;em&gt;&lt;strong&gt;Full Name&lt;/strong&gt;&lt;/em&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;
    &amp;lt;!-- &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;When creating an admin user with Forms auth, use this as the pasword &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;--&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: rgb(163, 21, 21);"&gt;add &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;key&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Microsoft.LightSwitch.Admin.Password&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;quot;&lt;strong&gt;&lt;em&gt;strongPassword&lt;/em&gt;&lt;/strong&gt;&amp;quot; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Once your application runs for the first time and the System Administrator is added, you can remove these settings to avoid storing the password in your web.config indefinitely. &lt;/p&gt;

&lt;h3&gt;Wrap Up&lt;/h3&gt;

&lt;p&gt;Most of these are the more advanced IIS deployment settings that should help IT administrators with hosting/deploying LightSwitch applications. And it’s definitely nice that you can host V2 applications without changing your V1 servers. Most users will not need to wade through these settings and will instead deploy directly, hand off a package to an administrator to install, or use the user interface in IIS Manager to import the package manually. However, if you want the power of automated install of packages, and more control over your deployments then these new features should help. &lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10288661" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Deployment/">Deployment</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>LightSwitch in Visual Studio 11 Beta Resources</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/03/27/lightswitch-in-visual-studio-11-beta-resources.aspx</link><pubDate>Tue, 27 Mar 2012 23:10:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10288233</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10288233</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/03/27/lightswitch-in-visual-studio-11-beta-resources.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://bit.ly/LightSwitchDev11"&gt;&lt;img style="margin: 0px 8px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5315.image_5F00_11ACECA6.png" width="274" height="287" /&gt;&lt;/a&gt;If you haven’t noticed the LightSwitch team has been releasing a lot of good content around &lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads#vs" target="_blank"&gt;the next version of LightSwitch in Visual Studio 11&lt;/a&gt;. We’ve created a page on the &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;LightSwitch Developer Center&lt;/a&gt; with a list of key Beta resources for you. Check back to the page often as we add more content each week! Here’s the easy-to-remember URL:&lt;/p&gt;  &lt;h2&gt;&lt;a title="http://bit.ly/LightSwitchDev11" href="http://bit.ly/LightSwitchDev11"&gt;http://bit.ly/LightSwitchDev11&lt;/a&gt;&lt;/h2&gt;  &lt;p&gt;Goodies include…&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/dc25522b-4a60-4f19-a5f8-bdec898f6599?SRC=Featured"&gt;New Cosmopolitan Shell &amp;amp; Theme&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/2381b03b-5c71-4847-a58e-5cfa48d418dc" target="_blank"&gt;New Extensibility Toolkit&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh708878(v=VS.110).aspx" target="_blank"&gt;New Documentation&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/LightSwitchDev11Beta/threads" target="_blank"&gt;Beta Forum for Asking Questions&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;Articles (more each week)&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=390e5f99-0e08-468c-8f59-00861dfa9865&amp;amp;title=Article%3a+Enhance+Your+LightSwitch+Applications+with+OData&amp;amp;uri=http%3a%2f%2fblogs.msdn.com%2fb%2flightswitch%2farchive%2f2012%2f03%2f06%2fenhance-your-lightswitch-applications-with-odata-beth-massi.aspx&amp;amp;k=kvornkinyCEe2oYseYxl5tkxrLFZCgqvqh2rZDapEcg%3d"&gt;Enhance Your LightSwitch Applications with OData&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=8c72a74f-5afd-4b2e-a187-1431c3550903&amp;amp;title=Article%3a+Creating+and+Consuming+LightSwitch+OData+Services&amp;amp;uri=http%3a%2f%2fblogs.msdn.com%2fb%2fbethmassi%2farchive%2f2012%2f03%2f09%2fcreating-and-consuming-lightswitch-odata-services.aspx&amp;amp;k=ohQOndwuHPHA%2bQ%2f9hf%2fXiKUSjkAJ9CGrmBBH%2bQHBQEY%3d"&gt;Creating and Consuming LightSwitch OData Services&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=17378df1-e63c-41e8-b806-33141b9ec16b&amp;amp;title=Article%3a+Using+LightSwitch+OData+Services+in+a+Windows+8+Metro+Style+Application+&amp;amp;uri=http%3a%2f%2fblogs.msdn.com%2fb%2flightswitch%2farchive%2f2012%2f03%2f13%2fusing-lightswitch-odata-services-in-a-windows-8-metro-style-application-elizabeth-maher.aspx&amp;amp;k=cKION3wi4YlZ8zDNwH4gMIKaGqV3nviZV73PsVIVmx4%3d"&gt;Using LightSwitch OData Services in a Windows 8 Metro Style Application &lt;/a&gt;    &lt;br /&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=b3b47090-4dad-4fa7-b17b-21f15b3206b2&amp;amp;title=LightSwitch+Architecture%3a+OData+&amp;amp;uri=http%3a%2f%2fblogs.msdn.com%2fb%2flightswitch%2farchive%2f2012%2f03%2f22%2flightswitch-architecture-odata.aspx&amp;amp;k=BxDMnCK2GKQwGufla1hxk%2bWrCoNpg%2fjsarRTNwNtJ%2bs%3d"&gt;LightSwitch Architecture: OData &lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Samples &amp;amp; Walkthroughs&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=61053332-676c-4300-837d-62c1cf71a97f&amp;amp;title=Vision+Clinic+Walkthrough+%26+Sample&amp;amp;uri=http%3a%2f%2fcode.msdn.microsoft.com%2fLightSwitch-in-Visual-bca65069&amp;amp;k=5EMSd2vBybS7umEOutbLDui%2fOyQJ%2fCy8MDOZARliEkI%3d"&gt;Vision Clinic Walkthrough &amp;amp; Sample&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://services.social.microsoft.com/feeds/FeedItem?feedId=523c4911-3b67-40c4-b84f-7ce3cd75b604&amp;amp;itemId=72cf874c-ea1b-4ee6-bfe9-dff9a4006a50&amp;amp;title=Contoso+Construction+-+LightSwitch+Advanced+Sample+(Visual+Studio+11+Beta)&amp;amp;uri=http%3a%2f%2fcode.msdn.microsoft.com%2fContoso-Construction-338952fd&amp;amp;k=m%2fZFNExe8AZ0QLQ1xA2gp%2bI4pwRWGmljbIQ6iW%2bi4dQ%3d"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So bookmark the &lt;a href="http://bit.ly/LightSwitchDev11" target="_blank"&gt;LightSwitch in Visual Studio 11 Beta Resources&lt;/a&gt; page and stay tuned for a lot more stuff on the way!&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10288233" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Samples/">Samples</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Extensibility/">Extensibility</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>Deploying LightSwitch Applications to IIS6 &amp; Automating Deployment Packages</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/03/23/deploying-lightswitch-applications-to-iis6-amp-automating-deployment-packages.aspx</link><pubDate>Fri, 23 Mar 2012 20:34:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10287066</guid><dc:creator>Beth Massi</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10287066</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/03/23/deploying-lightswitch-applications-to-iis6-amp-automating-deployment-packages.aspx#comments</comments><description>&lt;p&gt;A lot of folks have asked me for information on how to publish a LightSwitch application to IIS6. With the help of a couple team members we finally got the steps written down. This is a follow up to the detailed IIS7 on Windows Server 2008 deployment guide which you should familiarize yourself with first. There is a lot more information there on how deployment actually works:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx" target="_blank"&gt;Deployment Guide: How to Configure a Web Server to Host LightSwitch Applications&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this post I&amp;rsquo;m just going to show you the basic steps necessary to configure a Windows 2003 Server with IIS6 installed. I&amp;rsquo;ll also show you the MSDeploy commands you need to automate a deployment package created with Visual Studio LightSwitch.&lt;/p&gt;
&lt;h3&gt;Setup IIS6 on Windows 2003 Server &lt;span style="text-decoration: underline;"&gt;with&lt;/span&gt; Web Platform Installer&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Install Web Platform Installer&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can use the &lt;a href="http://www.microsoft.com/web/downloads/platform.aspx"&gt;Web Platform Installer&lt;/a&gt; (WPI) to set up a Windows web server &lt;strong&gt;fast&lt;/strong&gt;. This makes it super easy to set up a machine with all the stuff you need. Although you can do this all manually,&lt;strong&gt; I highly recommend you set up your LightSwitch server this way. &lt;/strong&gt;This will install IIS &amp;amp; Web Deploy for you (if you don&amp;rsquo;t have it installed already) and configure them properly.&lt;/p&gt;
&lt;p&gt;To get started, select the &lt;strong&gt;Products&lt;/strong&gt; link at the top then select &lt;strong&gt;Tools&lt;/strong&gt; on the left. There you will see two options for LightSwitch Server Runtime. One option is to install SQL Server Express called &amp;ldquo;&lt;strong&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=193835"&gt;Visual Studio LightSwitch 2011 Server Runtime and Local SQL&lt;/a&gt;&lt;/strong&gt;&amp;ldquo; and the other is &amp;ldquo;without Local SQL&amp;rdquo;. If you already have an edition of SQL Server installed on the machine or if you are hosting the database on another machine you can choose the &amp;ldquo;without Local SQL&amp;rdquo; option&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4265.image_5F00_6.png" width="703" height="463" /&gt;&lt;/p&gt;
&lt;p&gt;Select the option you want and then click Install and off you go. During the install you will need to reboot a few times.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Start Web Deployment Agent&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next we need to verify the Web Deployment Agent Service is started. Open up Services and right-click on Web Deployment Agent Service and select Start if it&amp;rsquo;s not already started.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0508.image_5F00_31E053BD.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0005.image_5F00_thumb_5F00_0D4EC639.png" width="745" height="286" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Configure Your Web Site and Database for Network Access&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In order for other computers to access your server&amp;rsquo;s websites via HTTP on a Windows 2003 machine, you need to configure the Windows Firewall. Click on the Advanced tab, select the network connection and click the Settings&amp;hellip; button. On the Services tab check off the &amp;ldquo;Web Server (HTTP)&amp;rdquo; and verify the name of your web server, then click OK.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8015.image_5F00_70D1D458.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0412.image_5F00_thumb_5F00_374EC461.png" width="561" height="486" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now computers on your network will be able to navigate to the server via http://&lt;em&gt;SERVERNAME&lt;/em&gt;. Next thing you need to verify is that your database server is also accessible. This configuration is the same as I describe in the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx" target="_blank"&gt;Deployment Guide&lt;/a&gt; using SQL Configuration Manager so refer to that post.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 4: Deploy from Visual Studio LightSwitch&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that your server is set up, you can deploy directly from Visual Studio LightSwitch. Keep in mind that when you deploy directly to IIS6 that the service URL should use http, not https. Https web deployment it is not supported on IIS6. See the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx" target="_blank"&gt;Deployment Guide&lt;/a&gt; for step-by-step instructions on how to walk through the deployment wizard.&lt;/p&gt;
&lt;p&gt;If you are not deploying directly from Visual Studio LightSwitch to your server but instead create a deployment package on disk, see the bottom of this post on how to install the package on IIS6.&lt;/p&gt;
&lt;h3&gt;Setup IIS6 on Windows 2003 Server &lt;span style="text-decoration: underline;"&gt;without&lt;/span&gt; Web Platform Installer&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Install IIS6&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First you will need to install IIS6 on your Windows 2003 box. You can take a look at this article for options on how to do this: &lt;a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/750d3137-462c-491d-b6c7-5f370d7f26cd.mspx?mfr=true" target="_blank"&gt;Installing IIS (IIS 6.0)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Install .NET Framework 4.0&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Next you will need to install the &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=17851" target="_blank"&gt;.NET Framework 4.0&lt;/a&gt; in order to get ASP.NET on the box.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Install Web Deploy 1.1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In order to publish deployment packages you need to install Web Deploy 1.1. Install the appropriate package based on your server architecture and refer to this documentation for installation details: &lt;a href="http://technet.microsoft.com/en-us/library/dd569059%28v=ws.10%29.aspx" target="_blank"&gt;Web Deployment Tool Installation&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://go.microsoft.com/?linkid=9684516"&gt;Web Deployment Tool (x86)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://go.microsoft.com/?linkid=9684517"&gt;Web Deployment Tool (x64)&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Step 4: Install &lt;strong&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=193835"&gt;Visual Studio LightSwitch 2011 Server Runtime&lt;/a&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5: Start Web Deployment Agent&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open up Services and right-click on Web Deployment Agent Service and select &lt;strong&gt;Start&lt;/strong&gt; if it&amp;rsquo;s not already started. See Step 2 in above section.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 6: Configure Your Web Site and Database for Network Access&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In order for other computers to access your server&amp;rsquo;s websites via HTTP on a Windows 2003 machine, you need to configure the Windows Firewall. See step 3 in the above section on how to do this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 7: Set .XAP file MIME type&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In IIS Manager, verify the mime type for the .xap file extension. Right-click on the Default Web Site and select Properties then select the HTTP Headers tab. Click MIME Types&amp;hellip; and map the &lt;strong&gt;.xap&lt;/strong&gt; extension to &lt;strong&gt;application/x-silverlight-app &lt;/strong&gt;as shown:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3632.image_5F00_2FC354F4.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4718.image_5F00_thumb_5F00_5D4474B7.png" width="494" height="569" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 8: Deploy from Visual Studio LightSwitch&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that your server is set up, you can deploy directly from Visual Studio LightSwitch. Keep in mind that when you deploy directly to IIS6 that the service URL should use http, not https. Https web deployment it is not supported on IIS6. See the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx" target="_blank"&gt;Deployment Guide&lt;/a&gt; for step-by-step instructions on how to walk through the deployment wizard.&lt;/p&gt;
&lt;p&gt;If you are not deploying directly from Visual Studio LightSwitch to your server but instead create a deployment package on disk, see below for steps on how to install the package on IIS6.&lt;/p&gt;
&lt;h3&gt;Importing a LightSwitch Deployment Package into IIS&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Note: These instructions will only work for the RTM (version 1) Release of Visual Studio LightSwitch (not LightSwitch in Visual Studio 11 Beta). These instructions will work for both IIS6 and 7+&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Instead of using direct deployment from the LightSwitch deployment wizard, you can choose to create a deployment package on disk. (See the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/03/23/deployment-guide-how-to-configure-a-web-server-to-host-lightswitch-applications.aspx" target="_blank"&gt;Deployment Guide&lt;/a&gt; for step-by-step on how to walk through the deployment wizard to create a package and deploy it to IIS7).&lt;/p&gt;
&lt;p&gt;In order to deploy to IIS6 you need to use the MSDeploy command line tool. If you are going to be creating or updating a &lt;strong&gt;remote &lt;/strong&gt;database you will also need SQL Server Management Objects installed on this machine. You can get these through the Web Platform Installer referenced above and selecting SQL Server Management Studio 2008 R2 Express or the Visual Studio LightSwitch 2011 Server Runtime with Local SQL. You can also &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=16978" target="_blank"&gt;obtain them directly from here&lt;/a&gt;. If you already have SQL or SQL Express installed then you can skip this prerequisite.&lt;/p&gt;
&lt;p&gt;1. Make sure you are logged in as an administrator of the machine.&lt;/p&gt;
&lt;p&gt;2. Copy the deployment package (i.e. Application1.zip) to the IIS6 server machine.&lt;/p&gt;
&lt;p&gt;3. Next create a file with the parameters you are going to need to pass to MSDeploy. You can obtain the parameters you need from the package by executing this command. Open a command prompt and assuming the path to the deployment package is C:\Publish\Application1.zip, type:&lt;/p&gt;
&lt;p&gt;&amp;gt;&lt;strong&gt;"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:getParameters -source:package=C:\Publish\Application1.zip&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This will list out the parameters you need. Some of them will change based on the type of authentication you are using. For any LightSwitch application you will need to specify the following:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;xml &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;version&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;1.0&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;encoding&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;utf-8&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;?&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;parameters&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseAdministratorConnectionString&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;br /&gt;&lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Data Source=&lt;em&gt;&lt;strong&gt;&lt;span style="color: #000000;" color="#000000"&gt;servername\SQLEXPRESS&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;;Initial Catalog=&lt;strong&gt;&lt;em&gt;&lt;span style="color: #000000;" color="#000000"&gt;Application1&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;;&lt;br /&gt;User ID=&lt;strong&gt;&lt;em&gt;&lt;span style="color: #000000;" color="#000000"&gt;admin&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;;Password=&lt;em&gt;&lt;strong&gt;&lt;span style="color: #000000;" color="#000000"&gt;adminPassword&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseServer&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;em&gt;&lt;strong&gt;&lt;span style="color: #000000;" color="#000000"&gt;servername\SQLEXPRESS&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseName&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color: #000000;" color="#000000"&gt;Application1&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseUserName&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;em&gt;&lt;strong&gt;&lt;span style="color: #000000;" color="#000000"&gt;dbuser&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;DatabaseUserPassword&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;em&gt;&lt;strong&gt;&lt;span style="color: #000000;" color="#000000"&gt;dbpassword&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;em&gt;&lt;strong&gt;&lt;span style="color: #000000;" color="#000000"&gt;Application1&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;_IisWebApplication&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Default Web Site/&lt;strong&gt;&lt;em&gt;&lt;span style="color: #000000;" color="#000000"&gt;Application1&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;parameters&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Note that the DatabaseAdministratorConnectionString is only used by this process to create/update the database. The DatabaseUserName and DatabaseUserPassword values are used to construct the connection string in the web.config and is the credential used by the LightSwitch middle-tier when your app is running.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are using Windows authentication you will need to specify one additional parameter:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application Administrator User Name&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color: #000000;" color="#000000"&gt;DOMAIN\UserName&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;If you are using Forms authentication you will need to specify three additional parameters:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application Administrator User Name&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color: #000000;" color="#000000"&gt;UserName&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application Administrator Full Name&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;em&gt;&lt;strong&gt;&lt;span style="color: #000000;" color="#000000"&gt;Full Name&lt;/span&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt; &amp;lt;&lt;/span&gt;&lt;span style="background: white; color: #a31515;"&gt;setParameter &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;name&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Application Administrator Full Password&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: red;"&gt;value&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;=&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;"&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color: #000000;" color="#000000"&gt;strongPassword&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;" &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;4. Save the parameters XML file in the same location as the deployment package (i.e. Application1.Parameters.xml)&lt;/p&gt;
&lt;p&gt;5. Run the following command to import the package, replacing the ServerName below with the name of the IIS server:&lt;/p&gt;
&lt;p&gt;&amp;gt;&lt;strong&gt;"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:package=c:\Publish\Application1.zip &amp;ndash;dest:auto,computerName=http://&lt;/strong&gt;&lt;em&gt;ServerName&lt;/em&gt;&lt;strong&gt;/MSDEPLOYAGENTSERVICE -setParamFile:c:\Publish\Application1.Parameters.xml&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you get any errors connecting to the deployment service then double-check the service is running (as shown above) and verify that you are logged in as an administrator of the machine.&lt;/p&gt;
&lt;p&gt;6. If your application is using Forms or Windows authentication then you need to also run the following command to set up the Admin user in the database so you can log in the first time. You need to specify the location of the web.config to do this.&lt;/p&gt;
&lt;p&gt;For Windows authentication, run:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;gt;&amp;rdquo;C:\Program Files\Microsoft Visual Studio 10.0\LightSwitch\1.0\Tools\Microsoft.LightSwitch.SecurityAdmin.exe&amp;rdquo; /createadmin &lt;br /&gt; /config:"c:\inetpub\wwwroot\&lt;/strong&gt;&lt;em&gt;Application1&lt;/em&gt;&lt;strong&gt;\web.config" /user:"&lt;/strong&gt;&lt;em&gt;DOMAIN\UserName&lt;/em&gt;&lt;strong&gt;" &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For Forms authentication run:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;gt;&amp;rdquo;C:\Program Files\Microsoft Visual Studio 10.0\LightSwitch\1.0\Tools\Microsoft.LightSwitch.SecurityAdmin.exe&amp;rdquo; /createadmin &lt;br /&gt; /config:"c:\inetpub\wwwroot\&lt;/strong&gt;&lt;em&gt;Application1&lt;/em&gt;&lt;strong&gt;\web.config" /user:"&lt;/strong&gt;&lt;em&gt;UserName&lt;/em&gt;&lt;strong&gt;" /fullname:"&lt;/strong&gt;&lt;em&gt;Full Name&lt;/em&gt;&lt;strong&gt;" /password:"&lt;/strong&gt;&lt;em&gt;strongPassword&lt;/em&gt;&lt;strong&gt;"&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can perform the same steps on either an IIS6 or IIS7 machine.&lt;/p&gt;
&lt;h3&gt;Wrap Up&lt;/h3&gt;
&lt;p&gt;Direct deployment is a lot less work if you can allow it. The LightSwitch publishing wizard performs all the necessary steps for you directly from the LightSwitch development environment. However, often times you do not have (nor want) access to deployment servers. This is why LightSwitch can produce deployment packages on disk instead. With IIS7, you can import these packages using the GUI in IIS manager, however in IIS6 you need to use the MSDeply command line as shown above.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re making improvements to the deployment in LightSwitch in Visual Studio 11 and in my next post on deployment I&amp;rsquo;ll walk through some of the enhancements. In particular, now when you create a package, the parameters and command files are automatically generated for you alongside the deployment package. This makes it really easy to just add your settings and go. Until next time&amp;hellip;&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;UPDATE 2/29/2012: &lt;a class="internal-link view-post" href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/29/lightswitch-iis-deployment-enhancements-in-visual-studio-11.aspx"&gt;&lt;span&gt;&lt;/span&gt;LightSwitch IIS Deployment Enhancements in Visual Studio 11&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10287066" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS2010/">VS2010</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Deployment/">Deployment</category></item><item><title>LightSwitch Cosmopolitan Shell and Theme for VS 11 Beta</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/03/19/lightswitch-cosmopolitan-shell-and-theme-for-vs-11-beta.aspx</link><pubDate>Mon, 19 Mar 2012 19:16:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10285093</guid><dc:creator>Beth Massi</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10285093</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/03/19/lightswitch-cosmopolitan-shell-and-theme-for-vs-11-beta.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;NOTE: This information applies to LightSwitch in Visual Studio 11 beta. &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Last week the team released &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/15/lightswitch-cosmopolitan-shell-and-theme-for-visual-studio-11-beta-released.aspx" target="_blank"&gt;the LightSwitch Cosmopolitan Shell and Theme for Visual Studio 11 Beta&lt;/a&gt; and there has been a ton of great feedback so far. So this morning I decided to update my &lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd" target="_blank"&gt;Contoso Construction sample application&lt;/a&gt; to use it. &lt;/p&gt;  &lt;p&gt;This shell displays the application logo at the top right, so I made some minor tweaks to the Home Screen to remove the logo image I had there before. I also updated some of the icons on the screen command bars to make them look a little better with this shell, like adding a transparent background. &lt;/p&gt;  &lt;p&gt;Check it out! (click pictures to enlarge)&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2821.Contoso1_5F00_6611FF43.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="Contoso1" border="0" alt="Contoso1" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3005.Contoso1_5F00_thumb_5F00_451E8C9C.png" width="641" height="486" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5633.Contoso2_5F00_5D41F6F7.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="Contoso2" border="0" alt="Contoso2" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2313.Contoso2_5F00_thumb_5F00_75656152.png" width="645" height="501" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6116.Contoso3_5F00_227A4E21.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="Contoso3" border="0" alt="Contoso3" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1817.Contoso3_5F00_thumb_5F00_12F73C52.png" width="650" height="734" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;What I really like is the ability to brand the application with your own logo by specifying an image on the general properties of the application. This appears across the top of the main window. If you don’t specify an image then no space is taken up for it.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2084.image_5F00_4AC98075.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8666.image_5F00_thumb_5F00_582F937B.png" width="611" height="298" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Another thing I really like is the cleaner menu system which takes up a lot less space than the previous “Office” theme. This theme will become the default theme for LightSwitch applications you create with LightSwitch V2 in Visual Studio 11. You’ll still be able to select the office theme, but this one will be the default on new apps. &lt;/p&gt;  &lt;p&gt;I’ve updated the sample here:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd"&gt;&lt;img border="0" alt="Download Sample" src="http://i.msdn.microsoft.com/ee402630.Download_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt; &lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Let us know what you think of the new shell by leaving a comment here or on the &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/15/lightswitch-cosmopolitan-shell-and-theme-for-visual-studio-11-beta-released.aspx" target="_blank"&gt;LightSwitch team blog post&lt;/a&gt;. There are a lot of great comments there already. &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10285093" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Samples/">Samples</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>Creating and Consuming LightSwitch OData Services</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx</link><pubDate>Fri, 09 Mar 2012 14:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10280047</guid><dc:creator>Beth Massi</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10280047</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;NOTE: This information applies to LightSwitch in Visual Studio 11 beta. &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;In the &lt;a href="http://msdn.microsoft.com/en-us/vstudio/hh852657" target="_blank"&gt;next version of LightSwitch&lt;/a&gt;, we’ve added support for &lt;a href="http://www.odata.org/" target="_blank"&gt;OData services&lt;/a&gt;, both consuming external services as well as producing services from the LightSwitch middle-tier. The Open Data Protocol (OData) standardizes the way we communicate with data services over the web. Many enterprises today use OData as a means to exchange data between systems, partners, as well as provide an easy access into their data stores. So it makes perfect sense that LightSwitch, which centers around data, also should work with data services via OData. Since OData is a standard protocol, it also means that other clients can access the data you create through LightSwitch. &lt;/p&gt;  &lt;p&gt;In my &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/06/enhance-your-lightswitch-applications-with-odata.aspx" target="_blank"&gt;last post on OData in LightSwitch&lt;/a&gt; I showed you how we could use external OData services to enhance our LightSwitch applications. In this post I’ll show you how to consume OData services that LightSwitch exposes. &lt;/p&gt;  &lt;h3&gt;Creating OData Services with LightSwitch&lt;/h3&gt;  &lt;p&gt;Creating OData services in LightSwitch doesn’t take any additional skills than you had before. In fact, you don’t have to do anything special to create these services. They are automatically created when you define your data and compile your application. Each data source you use in your LightSwitch application becomes a data service endpoint. Within those endpoints, each entity you define in LightSwitch is exposed automatically. Instead of the “black box” middle-tier we had in the first version of LightSwitch, we now have an open middle-tier that can be used to interface with other systems and clients.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3414.image_5F00_44C9411A.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3513.image_5F00_thumb_5F00_681635BF.png" width="532" height="366" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What’s really compelling here is not only can you model data services easily with LightSwitch, but any business logic (and user permissions) that you have written on your entities will execute as well, no matter what client is accessing the services. And since OData is an open protocol there are a multitude of client libraries available for creating all sorts of applications on a variety of platforms, from web, phone, etc. &lt;/p&gt;  &lt;p&gt;Let’s dig into the service endpoints a little more and see what they look like. For this example I’m going to use the &lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd" target="_blank"&gt;Contso Construction sample&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;Getting to Your LightSwitch OData Services&lt;/h3&gt;  &lt;p&gt;When you deploy your LightSwitch application in a three-tier configuration (either hosting the middle-tier in IIS or Windows Azure) then the service endpoints are exposed. The name of the services correspond to the name of your data sources. In the Contoso Construction sample, we have two service endpoints because we have two data sources. Within each of the services, we can navigate to all the entity sets we model in the data designer. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6646.image_5F00_6E5D0C4D.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3404.image_5F00_thumb_5F00_0D9FB321.png" width="700" height="394" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are a couple ways you can get to the services when debugging. The easiest thing to do is to change the client application type in the project properties to “Web”. When you debug the app (F5) you will see the port number Visual Studio has assigned you in the address bar of your browser. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3414.image_5F00_5ACFACAC.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2425.image_5F00_thumb_5F00_214C9CB5.png" width="460" height="210" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;While debugging, open another tab in the browser and navigate to your OData service using the port number. You will see the list of entity sets available to query through the service. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4087.image_5F00_52D80A4A.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5226.image_5F00_thumb_5F00_1235BDDB.png" width="496" height="634" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The Open Data Protocol is a REST-ful protocol based on AtomPub and &lt;a href="http://www.odata.org/developers/protocols/uri-conventions" target="_blank"&gt;defines a set of query operations&lt;/a&gt; that can be performed on the data using a set of URI conventions. You query the service with an HTTP-GET request and the service will return to you a feed with the results in the response. To see the raw feed in IE, go to Tools –&amp;gt; Internet Options, Content tab. Under Feeds &amp;amp; Web Slices click “Settings” then uncheck “Turn on feed reading view”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2821.image_5F00_23A61EB3.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6786.image_5F00_thumb_5F00_29ECF541.png" width="783" height="542" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If we want to see all the customers in the system we can simply type the URL &lt;em&gt;http://localhost:41155/ApplicationData.svc/Customers &lt;/em&gt;and you will get the following response from the service. Each entry in the feed is a customer entity which corresponds to a row in the database. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1004.image_5F00_622B6C59.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8666.image_5F00_thumb_5F00_756C22F8.png" width="683" height="646" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Keep in mind that the &lt;strong&gt;queries are case sensitive&lt;/strong&gt;. Notice it’s &lt;strong&gt;C&lt;/strong&gt;ustomers not customers in the URL. If you want to return a customer who’s ID = 1 then use: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;http://localhost:41155/ApplicationData.svc/Customers(&lt;strong&gt;1&lt;/strong&gt;)&lt;/em&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;which would return only the first customer shown above. Similarly, the OData protocol defines a standard way of navigating relationships via navigation properties. If you want to get all the construction projects for a particular customer use: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;http://localhost:41155/ApplicationData.svc/Customers(1)/&lt;strong&gt;Projects&lt;/strong&gt;&lt;/em&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;which would return just that customer’s projects. If you want to return only Customers who’s last name is “Massi” then use:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;http://localhost:41155/ApplicationData.svc/Customers&lt;strong&gt;?$filter=LastName eq 'Massi'&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Of course there are a whole slew of other query operations supported like OrderBy, Top, Skip, Sort, etc. Take a look at the &lt;a href="http://www.odata.org/developers/protocols/uri-conventions" target="_blank"&gt;Open Data Protocol URI conventions&lt;/a&gt; for a full list. There are also operations defined in the protocol for performing updates, inserts and deletes using standard HTTP verbs. The LightSwitch client communicates with the middle-tier data services this way. &lt;/p&gt;  &lt;p&gt;Another way to inspect the service requests and responses is to install a tool like &lt;a href="http://www.fiddler2.com/fiddler2/" target="_blank"&gt;Fiddler&lt;/a&gt;. Fiddler is a Web Debugging Proxy which logs all http(s) traffic between your computer and the Internet or localhost. This way you don’t have to change the client application type, you can leave it as a desktop application and still see the traffic. If you’re trying to build your own clients against OData services this is a must-have tool. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3652.image_5F00_540C7D5C.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7840.image_5F00_thumb_5F00_04BF8508.png" width="731" height="536" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now that you understand how OData services are exposed from the LightSwitch middle-tier, let’s move on and consume some of our data from another client outside the LightSwitch client. One of my favorite tools for analyzing data is Excel. &lt;/p&gt;  &lt;h3&gt;Consuming LightSwitch Services in Excel using PowerPivot&lt;/h3&gt;  &lt;p&gt;You don’t actually need to know anything about OData to consume these services in Excel. Excel has a free add-in aimed at power users called PowerPivot that you can install into Excel 2010 to get access to all sorts of data sources that Excel doesn’t support out of the box, including OData feeds. Download it at &lt;a href="http://www.powerpivot.com"&gt;www.powerpivot.com&lt;/a&gt;. You can arm your power users with this add-in and point them to your LightSwitch data services to perform complex data analysis and create reports all in a familiar tool.&lt;/p&gt;  &lt;p&gt;To connect Excel to an OData service, click on the PowerPivot tab and then click the “PowerPivot Window” button to launch PowerPivot. Click the “From Data Feeds” button and supply the Data Feed URL, then click next. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2477.image_5F00_2395F8E6.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5773.image_5F00_thumb_5F00_62F3AC76.png" width="785" height="713" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;At this point you can select from a list of data sets.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6170.image_5F00_503EB2BF.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7356.image_5F00_thumb_5F00_1AC5F09A.png" width="531" height="546" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Select the data you want and then click finish. PowerPivot will import the data you select into a set of spreadsheets. You can keep importing additional feeds or data sources into PowerPivot and then relate them together to create powerful data mashups. To create relationships between your data sets select the Design tab on the PowerPivot window and click Manage Relationships. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6675.image_5F00_56195658.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0003.image_5F00_thumb_5F00_476EAA73.png" width="653" height="523" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once you set up the relationships you need, you can create pivot tables and charts by selecting the Home tab and dropping down the PivotTable button.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4113.image_5F00_2D9A7444.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4604.image_5F00_thumb_5F00_53FC578F.png" width="716" height="312" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You will then see the PowerPivot Field List window that you can use to create charts like normal. Keep in mind that if you are not working against LightSwitch data services that are deployed but are instead trying this while debugging, you may need to update the port number to your data service. You can do this in the PowerPivot window by selecting the Design tab and then clicking “Existing Connections”. Then you can update the port number and refresh the data back on the Home tab. &lt;/p&gt;  &lt;p&gt;The updated Contoso Construction sample contains a spreadsheet in the root folder called ContsoAnalysisPowerPivot.xlsx that has a variety of charts you can play with. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd" target="_blank"&gt;&lt;img border="0" alt="Download Sample" src="http://i.msdn.microsoft.com/ee402630.Download_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd" target="_blank"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2538.image_5F00_135A0B20.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0882.image_5F00_thumb_5F00_2B114286.png" width="765" height="608" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Wrap Up&lt;/h3&gt;  &lt;p&gt;I hope you are now starting to realize how powerful LightSwitch can be not only to create business applications, but also &lt;strong&gt;data services. &lt;/strong&gt;Being able to consume as well as expose LightSwitch data sources as OData services opens the door for a wide variety of client applications accessing your data through your business rules. In the next few weeks &lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;the team&lt;/a&gt; and I will take you on some more adventures with OData and show you some of the numerous possibilities you now have. Of course, we’ll also drill into other new features as well. Stay tuned!&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10280047" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Office/">Office</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/OData/">OData</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>LightSwitch Community &amp; Content Rollup–February 2012</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/03/07/lightswitch-community-amp-content-rollup-february-2012.aspx</link><pubDate>Wed, 07 Mar 2012 14:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10278633</guid><dc:creator>Beth Massi</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10278633</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/03/07/lightswitch-community-amp-content-rollup-february-2012.aspx#comments</comments><description>&lt;p&gt;Well I know I’m a little late getting this one out but I’ve been busy travelling all over the world and trying to sell and move out of my house so I apologize, it’s been a busy month! If you missed the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/tags/rollup/" target="_blank"&gt;previous rollups you can view them here&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;The big news last week of course was the release of Visual Studio 11 Beta which includes LightSwitch in the box! Very exciting to be on the Dev11 train. &lt;/p&gt;  &lt;h3&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=240162" target="_blank"&gt;Download Visual Studio 11 Beta&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;You can read about the major new features of LightSwitch in Visual Studio 11 beta on the team blog:&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/02/29/announcing-lightswitch-in-visual-studio-11-beta.aspx" target="_blank"&gt;Announcing LightSwitch in Visual Studio 11 Beta&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;We’ll be releasing more content weekly on all the new features so keep tuned into the &lt;a href="http://blogs.msdn.com/b/lightswitch/" target="_blank"&gt;LightSwitch team blog&lt;/a&gt; and the &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh852657" target="_blank"&gt;LightSwitch in Visual Studio 11 Beta page on the Developer Center&lt;/a&gt;. And please visit the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/LightSwitchDev11Beta/threads" target="_blank"&gt;LightSwitch in Visual Studio 11 Beta forum&lt;/a&gt; to ask the team questions. &lt;/p&gt;  &lt;p&gt;Of course a lot of other things happened in February…&lt;/p&gt;  &lt;h3&gt;LightSwitch Star Contest – Grand Prize Winners &amp;amp; Mini Case Studies&lt;/h3&gt;  &lt;p&gt;The &lt;a href="http://www.codeproject.com/Competitions/524/LightSwitch-Star-Contest.aspx" target="_blank"&gt;LightSwitch Star Contest&lt;/a&gt; has come to a close over on Code Project and all the prizes have been announced. However, even though the contest is over, CodeProject has&lt;a href="http://www.codeproject.com/KB/LightSwitch/#LightSwitch+Star+Contest" target="_blank"&gt;&lt;img style="margin: 10px 10px 0px; border: 0px currentcolor; float: right; display: inline; background-image: none;" title="MS VS LightSwitch Star Contest - banners - 300x250" border="0" alt="MS VS LightSwitch Star Contest - banners - 300x250" align="right" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0250.MS_2D00_VS_2D00_LightSwitch_2D00_Star_2D00_Contest_2D002D002D00_banners_2D002D002D00_300x250_5F00_5AD62E3B.jpg" width="194" height="162" /&gt;&lt;/a&gt; created a &lt;a href="http://www.codeproject.com/KB/LightSwitch/" target="_blank"&gt;dedicated LightSwitch section of their site&lt;/a&gt; to host the submissions as well as any new tutorials that people want to contribute. &lt;a href="http://www.codeproject.com/KB/LightSwitch/#LightSwitch+Star+Contest" target="_blank"&gt;Check out all the submissions&lt;/a&gt;, particularly ones that have been deployed to Azure, to give you an idea of the types of applications you can create quickly with LightSwitch.&lt;/p&gt;  &lt;p&gt;In early February they announced the grand prize winners. Here are all the winners of the contest. Congrats to all!&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Most Efficient Business Application &lt;/b&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;1st prize November: App name: &lt;a href="http://www.codeproject.com/KB/LightSwitch/SecurityCentral.aspx"&gt;Security Central&lt;/a&gt; – winner name: Keith Craigo&lt;/li&gt;    &lt;li&gt;2nd prize November: App name: &lt;a href="http://www.codeproject.com/KB/LightSwitch/PTA-LightSwitch.aspx"&gt;PTA LightSwitch&lt;/a&gt; – winner name: Matt Milner&lt;/li&gt;    &lt;li&gt;1st prize December: App name: &lt;a href="http://www.codeproject.com/KB/LightSwitch/Patient-Tracker.aspx"&gt;Patient Tracker&lt;/a&gt; – winner name: Netsuper&lt;/li&gt;    &lt;li&gt;2nd prize December: App name: &lt;a href="http://www.codeproject.com/KB/LightSwitch/Instant-Assets.aspx"&gt;Instant Assets&lt;/a&gt; – winner name: Delordson Kallon&lt;/li&gt;    &lt;li&gt;1st prize January: app name: &lt;a href="http://www.codeproject.com/Articles/316676/Lightswitch-Job-Hunter-Application"&gt;LightSwitch Job Hunter Application&lt;/a&gt; - winner name: stuxstu&lt;/li&gt;    &lt;li&gt;2nd prize January: app name: &lt;a href="http://www.codeproject.com/Articles/318840/Data-Centre-A-Product-Information-and-Promotion-Ma"&gt;Orion&lt;/a&gt; – winner name: TheRegan&lt;/li&gt;    &lt;li&gt;&lt;b&gt;Grand Prize&lt;/b&gt;: app name: &lt;a href="http://www.codeproject.com/Articles/286217/Security-Central"&gt;Security Central&lt;/a&gt; - winner name: Keith Craigo&lt;/li&gt;  &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;Most Ground-breaking Business Application&lt;/b&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;1st prize November: app name: &lt;a href="http://www.codeproject.com/KB/LightSwitch/Church.aspx"&gt;Church+&lt;/a&gt; - winner name: Ihesie Peter Onyebuchi&lt;/li&gt;    &lt;li&gt;2nd prize November: app name: &lt;a href="http://www.codeproject.com/KB/LightSwitch/Engineeringapp.aspx"&gt;Engineering App&lt;/a&gt; – winner name: Laurentz Tonniau&lt;/li&gt;    &lt;li&gt;1st prize December: app name: &lt;a href="http://www.codeproject.com/KB/LightSwitch/Health-Safety-System.aspx"&gt;Health and Safety Management System&lt;/a&gt; - winner name: PaulSPatterson&lt;/li&gt;    &lt;li&gt;2nd prize December: app name: &lt;a href="http://www.codeproject.com/KB/LightSwitch/Orion.aspx"&gt;Orion&lt;/a&gt; – winner name: Julio Iglesias Vázquez&lt;/li&gt;    &lt;li&gt;1st prize January: app name: &lt;a href="http://www.codeproject.com/Articles/319456/MyBizz-Portal-The-smallest-LightSwitch-application"&gt;MyBizz Portal&lt;/a&gt; - winner name: Jan Van der Haegen&lt;/li&gt;    &lt;li&gt;2nd prize January: app name: &lt;a href="http://www.codeproject.com/Articles/316162/Light-Enterprise-Solution"&gt;Light Enterprise Solution&lt;/a&gt; – winner name: Chun Te&lt;/li&gt;    &lt;li&gt;&lt;b&gt;Grand Prize&lt;/b&gt;: app name: &lt;a href="http://www.codeproject.com/Articles/319456/MyBizz-Portal-The-smallest-LightSwitch-application"&gt;MyBizz Portal&lt;/a&gt; - winner name: Jan Van der Haegen &lt;/li&gt;  &lt;/ul&gt;  &lt;h3&gt;LightSwitch at TechDays Netherlands&lt;/h3&gt;  &lt;p&gt;A couple weeks ago I had the pleasure of returning to one of my favorite countries, The Netherlands, to speak at TechDays. I delivered two LightSwitch talks, one intro and one advanced. &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/02/21/trip-report-techdays-2012-netherlands.aspx" target="_blank"&gt;Read my trip report on the fun adventures&lt;/a&gt; and check out the videos of my sessions: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2146"&gt;&lt;strong&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2146"&gt;&lt;strong&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2146"&gt;&lt;strong&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2146"&gt;&lt;strong&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2146"&gt;&lt;strong&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2146"&gt;Video Presentation: Introduction to Visual Studio LightSwitch&lt;/a&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2145"&gt;Video Presentation: Advanced Development &amp;amp; Customization Techniques&lt;/a&gt;&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;LightSwitch at MVP Summit&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/b/mvpawardprogram/archive/2012/02/29/beta-time-at-the-mvp-global-summit.aspx"&gt;&lt;img style="margin: 0px 10px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" title="image" border="0" alt="image" align="left" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7282.image_5F00_1314A554.png" width="240" height="145" /&gt;&lt;/a&gt;Last week over 1500 &lt;a href="http://mvp.support.microsoft.com/" target="_blank"&gt;Most Valuable Professionals&lt;/a&gt; visited Microsoft for a week of meetings with the product teams. It’s always great to see folks helping drive our developer communities face-to-face. I saw a lot of friends and the team got a lot of great feedback on LightSwitch (as well as Azure, Office &amp;amp; SharePoint development). While I was there, Jay Schmelzer and myself chatted with MVPs &lt;a href="http://www.brustblog.com/"&gt;Andrew Brust&lt;/a&gt; and &lt;a href="http://lightswitchhelpwebsite.com/"&gt;Michael Washington&lt;/a&gt; about LightSwitch in &lt;a href="http://www.microsoft.com/visualstudio/11/en-us"&gt;Visual Studio 11 Beta&lt;/a&gt;. Jay and Andrew talked about what developers can look forward to in the next release of LightSwitch and me and Michael chat about the community (of course!). Check out these short videos: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;h3&gt;&lt;a href="http://blogs.msdn.com/b/mvpawardprogram/archive/2012/02/29/beta-time-at-the-mvp-global-summit.aspx"&gt;Beta Time at the MVP Global Summit&lt;/a&gt;&amp;#160; &lt;/h3&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;h3&gt;LightSwitch Unleashed – Book Released!&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.bing.com/shopping/visual-studio-lightswitch-unleashedpaperback/p/CD51F53F8A5435050002?q=lightswitch+unleashed&amp;amp;lpq=lightswitch%20unleashed&amp;amp;FORM=HURE" target="_blank"&gt;&lt;img style="margin: 0px 10px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" title="Visual Studio Lightswitch Unleashed[Paperback]" border="0" alt="Visual Studio Lightswitch Unleashed[Paperback]" align="left" src="http://ts2.mm.bing.net/thumb/get?bid=hezEV%2fVN8GdT8A&amp;amp;bn=CC&amp;amp;fbid=7wIR63%2bClmj%2b0A&amp;amp;fbn=CC" width="97" height="127" /&gt;&lt;/a&gt;One of the things me and Michael spoke about in the interview is &lt;a href="http://community.visual-basic.it/AlessandroEnglish/default.aspx" target="_blank"&gt;Alessandro Del Sole’s&lt;/a&gt; book released last week. Congrats Ale!! I know it was a long road but you did it! I was the technical reviewer for the book and I know how much work it was to get it right. &lt;/p&gt;  &lt;h3&gt;Book: &lt;a href="http://www.bing.com/shopping/visual-studio-lightswitch-unleashedpaperback/p/CD51F53F8A5435050002?q=lightswitch+unleashed&amp;amp;lpq=lightswitch%20unleashed&amp;amp;FORM=HURE" target="_blank"&gt;Visual Studio LightSwitch Unleashed&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;Michael Washington also interviewed Alessandro on his website: &lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/119/An-Interview-With-Alessandro-Del-Sole-Author-of-LightSwitch-Unleashed.aspx" target="_blank"&gt;An Interview With Alessandro Del Sole&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;And Alessandro also made &lt;a href="http://t.co/TO2B9Kqi" target="_blank"&gt;chapter 3 available to download for free&lt;/a&gt;! Thanks!&lt;/p&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;h3&gt;More Notable Content this Month&lt;/h3&gt;  &lt;p&gt;LightSwitch in Visual Studio 11 Beta&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/02/29/announcing-lightswitch-in-visual-studio-11-beta.aspx" target="_blank"&gt;Announcing LightSwitch in Visual Studio 11 Beta&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/06/enhance-your-lightswitch-applications-with-odata-beth-massi.aspx"&gt;Enhance Your LightSwitch Applications with OData &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/02/lightswitch-filter-control-for-visual-studio-11-beta.aspx"&gt;LightSwitch Filter Control For Visual Studio 11 Beta&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/03/01/lightswitch-team-chats-with-mvps-about-visual-studio-11-beta.aspx"&gt;LightSwitch Team Chats with MVPs about Visual Studio 11 Beta&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.paulspatterson.com/technology/lightswitch/microsoft-lightswitch-a-first-class-citizen-to-visual-studio-11/"&gt;Microsoft LightSwitch – A First Class Citizen to Visual Studio 11&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/02/29/whats-new-in-visual-studio-lightswitch-11-ls-vs-vnext-beta-a-hackers-view/"&gt;What’s new in Visual Studio LightSwitch 11 (LS VS vNext Beta) – a hacker’s view&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/02/29/visual-studio-11-beta-released.aspx"&gt;Visual Studio 11 Beta Released!&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Sample: &lt;a href="http://code.msdn.microsoft.com/LightSwitch-in-Visual-bca65069"&gt;Vision Clinic Walkthrough &amp;amp; Sample (Visual Studio 11 Beta&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;Sample: &lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd"&gt;Contoso Construction - LightSwitch Advanced Sample (Visual Studio 11 Beta)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Visual Studio LightSwitch - RTM&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/108/Calling-Your-Custom-WCF-RIA-Services-Using-OData.aspx"&gt;Calling Your Custom WCF RIA Services Using OData&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/99/Creating-a-LightSwitch-Business-Type-Extension.aspx"&gt;Creating a LightSwitch Business Type Extension&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/104/Creating-A-LightSwitch-Collection-Control-Extension.aspx"&gt;Creating A LightSwitch Collection Control Extension&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/103/Creating-A-LightSwitch-Group-Extension.aspx"&gt;Creating A LightSwitch Group Extension&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/02/24/creating-a-very-dynamic-lightswitch-shell-extension-in-15-minutes-or-less/"&gt;Creating a very dynamic LightSwitch shell extension in 15 minutes or less&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/101/Enhancing-A-LightSwitch-Detail-Control-Extension.aspx"&gt;Enhancing A LightSwitch Detail Control Extension&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/107/Integrating-LightSwitch-Into-An-ASPNET-Application-To-Provide-Single-Sign-On.aspx"&gt;Integrating LightSwitch Into An ASPNET Application To Provide Single Sign On&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/02/09/lightswitch-screen-tips-scrollbars-and-splitters.aspx"&gt;LightSwitch Screen Tips: Scrollbars and Splitters&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://therearefourlightswitches.blogspot.com/2012/02/making-integers-searchable.html"&gt;Making integers searchable in LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.paulspatterson.com/technology/lightswitch/granular-reference-data/" target="_blank"&gt;Microsoft LightSwitch – Add Granularity to Reference Data&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.paulspatterson.com/technology/lightswitch/microsoft-lightswitch-data-first-and-breaking-some-rules/"&gt;Microsoft LightSwitch – Data First and Breaking Some &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.paulspatterson.com/technology/lightswitch/a-little-productivity-intro/"&gt;Microsoft LightSwitch – A Little Productivity&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/02/23/mybizz-portal-the-smallest-lightswitch-application-you-have-ever-seen-thank-you/"&gt;MyBizz Portal: The “smallest” LightSwitch application you have ever seen (Thank you!)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/105/The-DELORDSON-LightSwitch-OutlookBar-Shell.aspx"&gt;The DELORDSON LightSwitch OutlookBar Shell&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/02/21/trip-report-techdays-2012-netherlands.aspx"&gt;Trip Report–Techdays 2012 Netherlands&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;LightSwitch Team Community Sites&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.facebook.com/vslightswitch"&gt;&lt;img style="margin: 0px 10px 40px 0px;" border="0" alt="" align="left" src="http://badge.facebook.com/badge/151211271561073.1904.953280091.png" width="137" height="84" /&gt;&lt;/a&gt; Become a fan of &lt;a href="http://www.facebook.com/vslightswitch"&gt;Visual Studio LightSwitch on Facebook&lt;/a&gt;. Have fun and interact with us on our wall. Check out the cool stories and resources. Also here are some other places you can find the LightSwitch team:&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/vslightswitch"&gt;LightSwitch MSDN Forums&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/lightswitch"&gt;LightSwitch Team Blog&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://twitter.com/#!/VSLightSwitch"&gt;LightSwitch on Twitter&lt;/a&gt; (@VSLightSwitch, #VisualStudio #LightSwitch) &lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10278633" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Samples/">Samples</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Rollup/">Rollup</category></item><item><title>Enhance Your LightSwitch Applications with OData</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/03/06/enhance-your-lightswitch-applications-with-odata.aspx</link><pubDate>Tue, 06 Mar 2012 14:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10274896</guid><dc:creator>Beth Massi</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10274896</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/03/06/enhance-your-lightswitch-applications-with-odata.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;NOTE: This information applies to LightSwitch in Visual Studio 11 beta. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/02/29/announcing-lightswitch-in-visual-studio-11-beta.aspx" target="_blank"&gt;John announced Wednesday on the LightSwitch Team Blog&lt;/a&gt;, the next version of Visual Studio will include LightSwitch right in the box and there are a lot of awesome new features. My personal favorite is the Open Data Protocol (OData) services support. LightSwitch can now consume as well as produce OData services from it&amp;rsquo;s middle-tier. This means that applications you create with LightSwitch will automatically expose data as open services which allows a multitude of clients easy (secure) access into your data. It also means that you will be able to consume data services from within LightSwitch in order to enhance the capabilities of your applications. In this post I&amp;rsquo;m going to show you how you can take advantage of using OData in your LightSwitch applications. In the next post I&amp;rsquo;ll show you how you can work with the OData services LightSwitch creates. But first, a little background on OData.&lt;/p&gt;
&lt;h3&gt;What is the Open Data Protocol (OData)?&lt;/h3&gt;
&lt;p&gt;OData is an open REST-ful protocol for exposing and consuming data on the web. It attempts to break down the silos of data that are common across the web by standardizing on the way that data is accessed. Instead of learning new APIs to access data specific to each application&amp;rsquo;s web service, OData provides a common way to query and update data via REST. You can learn a lot more about OData at &lt;a href="http://www.odata.org"&gt;www.odata.org&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;OData has been around for a couple years and there are more and more providers of data services popping up all the time all over the web. Within Microsoft, many of our products expose and consume data services via the Open Data Protocol. For instance, SharePoint exposes all of its list data as OData services. Similarly, reports you create with Reporting Services can be exposed via OData. PowerPivot is an add-in to Excel 2010 that allows you to consume data services and perform complex data analysis on them. So it makes perfect sense that LightSwitch, which centers around data, also should work with data services via OData. Many enterprises today use OData as a means to exchange data between systems, partners, as well as provide an easy access into their data stores.&lt;/p&gt;
&lt;p&gt;To dive deeper into data services and the OData protocol you can read &lt;a href="http://www.odata.org/developers/articles" target="_blank"&gt;articles on OData.org&lt;/a&gt;, or &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/tags/ado-net+data+services/article/" target="_blank"&gt;here on my blog&lt;/a&gt;. A really good article I recommend is by Chris Sells - &lt;a href="http://msdn.microsoft.com/en-us/library/ff478141.aspx" target="_blank"&gt;Open Data Protocol by Example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this post I&amp;rsquo;m going to show you how to consume OData in your LightSwitch applications. For this example we&amp;rsquo;ll use some data from the Azure DataMarket. In my next post I&amp;rsquo;ll show you how to consume OData services that LightSwitch exposes in other clients, like Excel.&lt;/p&gt;
&lt;h3&gt;The Azure DataMarket&lt;/h3&gt;
&lt;p&gt;The Azure DataMarket is a place where producers can host their data sets and people can subscribe to them to enhance their client applications. There are all kinds of datasets you can subscribe to, some are free some are pay. There is weather, traffic, NASA, UN, and all sorts of other kinds of data available that you can use. (&lt;strong&gt;Beta Note: &lt;/strong&gt;Not all of the datasets are compatible with LightSwitch currently but we are working to make more of them compatible for the final release.)&lt;/p&gt;
&lt;p&gt;First you need to sign up for an account by navigating to &lt;a title="https://datamarket.azure.com/" href="http://datamarket.azure.com/"&gt;http://datamarket.azure.com/&lt;/a&gt;. Once you sign up, you will be given a customer ID and an Account Key. Now you can browse the plethora of data sets available to you in a multitude of categories. Let&amp;rsquo;s subscribe to a free dataset from Data.gov. In the Search box at the top right of the page search for &amp;ldquo;Crime&amp;rdquo; and in the results you will see the Data.gov dataset.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3173.image_5F00_0338A235.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0456.image_5F00_thumb_5F00_30B9C1F8.png" width="629" height="423" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Select the Data.Gov dataset and then click the Sign Up button on the right to activate the subscription. Then click the &amp;ldquo;Explore this Dataset&amp;rdquo; link to browse the data.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4478.image_5F00_376CCB7B.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4062.image_5F00_thumb_5F00_62452F8D.png" width="627" height="490" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click the &amp;ldquo;Run Query&amp;rdquo; button and the first 100 rows of the data will be returned to you.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6622.image_5F00_68F83910.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6786.image_5F00_thumb_5F00_08A712D9.png" width="631" height="276" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Notice at the top of the page you will see the Service root URL. This is the location of the service that we will use in our LightSwitch application. In this case it&amp;rsquo;s &lt;em&gt;https://api.datamarket.azure.com/data.gov/Crimes/&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Enhancing Contoso Construction with Crime Data&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;m going to take a variation of a sample I built a while ago that is an example of an application that could be used in the construction business. One of the features of this application is that it displays a map screen of the construction project location. From the Project screen users can click the Show Map button to open the map screen which uses a Bing Map control extension (included with the sample) to display the location.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7571.image_5F00_325D8EF0.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6560.image_5F00_thumb_5F00_58533F46.png" width="745" height="674" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7043.image_5F00_7E48EF9C.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1780.image_5F00_thumb_5F00_6F3210C2.png" width="739" height="674" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What we&amp;rsquo;d like to do is also display the crime data to the user so that they can see whether working in that city is generally safe or not. This is information we can get for free from the dataset we just subscribed to from the Azure DataMarket.&lt;/p&gt;
&lt;h4&gt;Connect LightSwitch to an OData Service&lt;/h4&gt;
&lt;p&gt;You add an OData service to your LightSwitch application just like you would any other external data source. Right-click on the Data Sources node in the Solution Explorer and then select &amp;ldquo;Add Data Source&amp;rdquo; to open the Attach Data Source Wizard. You will now see OData Service as an available choice.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7462.image28_5F00_46B32EAE.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8130.image28_5F00_thumb_5F00_262BEEFC.png" width="575" height="452" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click Next and enter the service root URL from above. Then for login information choose Other Credentials and enter your DataMarket Customer ID for the username and your Account Key for the password. You can get this information by logging into the DataMarket and navigating to &amp;ldquo;My Account&amp;rdquo; &lt;a title="https://datamarket.azure.com/account/info" href="https://datamarket.azure.com/account/info"&gt;https://datamarket.azure.com/account/info&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7140.image37_5F00_6CA8DF04.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6866.image37_5F00_thumb_5F00_611321C5.png" width="577" height="455" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click the Test Connection button and select the CityCrime dataset and click Test to make sure everything is working properly.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0118.image44_5F00_64B13CA2.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0020.image44_5F00_thumb_5F00_51FC42EB.png" width="582" height="457" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click Next and LightSwitch will display all the available entities for you to choose from. Select CityCrime and then name the Data Source &amp;ldquo;CrimeData&amp;rdquo; and click Finish.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5315.image50_5F00_4A70D37E.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2350.image50_5F00_thumb_5F00_630070CE.png" width="586" height="459" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next you will see the CrimeData added to the list of data sources in the Solution Explorer and LightSwitch will open the Data Designer where you can model the entities further. You can add business rules, set additional properties as well as add calculated fields. Just like any other external data source, you cannot change the underlying structure of the data, but you can select business types, declarative and custom validations, and configure a variety of other smart defaults.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8032.image54_5F00_297D60D7.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4426.image54_5F00_thumb_5F00_36E373DD.png" width="783" height="529" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What we want to do is display to the user the probability of being a victim to a violent crime in a specified city. So we need to calculate the ratio of violent crime using a computed property. Click the &amp;ldquo;Computed Property&amp;rdquo; button at the top of the Data Designer, call it ViolentCrimeRatio and make it a String. On the Properties window click &amp;ldquo;Edit Method&amp;rdquo; and provide the following result.&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;ViolentCrimeRatio_Compute(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As String&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;) &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;' Set result to the desired field value &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;If Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.ViolentCrime &amp;gt; 0 &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Then &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;String&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Format(&lt;/span&gt;&lt;span style="background: white; color: maroon;"&gt;"1 in {0}"&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Population \ &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.ViolentCrime) &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End If End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;We&amp;rsquo;re also going to want to set a Summary property for the entity so it displays nicely on screens. Add another computed String property called Summary and write the following code:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;Summary_Compute(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;ByRef &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;As String&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;) &lt;/span&gt;&lt;span style="background: white; color: green;"&gt; ' Set result to the desired field value &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;result = &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.City &amp;amp; &lt;/span&gt;&lt;span style="background: white; color: maroon;"&gt;", " &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;amp; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.State &amp;amp; &lt;/span&gt;&lt;span style="background: white; color: maroon;"&gt;": " &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;&amp;amp; &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Year &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Then select the CityCrime entity and at the bottom of the properties window set the Summary Property to the Summary field. At this point we can test out the data set by adding a quick Search Screen and selecting CrimeData.CityCrimes for the screen data.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6888.image_5F00_21198B80.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3252.image_5F00_thumb_5F00_60773F10.png" width="799" height="569" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hit F5 to build and run the app and open the Search City Crimes screen. Notice that LightSwitch is loading the data asynchronously and paging it for us automatically.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8535.image_5F00_2D3B05A7.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2744.image_5F00_thumb_5F00_7E754D04.png" width="801" height="530" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;Writing Queries Against an OData Service&lt;/h4&gt;
&lt;p&gt;Now that we&amp;rsquo;ve got our connection to the OData service, we want to write a query that pulls the data for a specific City and State. Writing a query against the OData services is the same experience as any other data source in LightSwitch.&lt;/p&gt;
&lt;p&gt;To add a new LightSwitch query, right-click on the CityCrimes entity in the Solution Explorer and select &amp;ldquo;Add Query&amp;rdquo; to open the Query Designer. Name the query CrimesByCityState. Then add two filter conditions; 1-&amp;nbsp; Where the State is equal to a New Parameter called State, and 2- Where the City is equal to a New Parameter called City. We&amp;rsquo;ll also sort the results by Year descending.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0284.image_5F00_5D81DA5D.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0272.image_5F00_thumb_5F00_590B5996.png" width="524" height="344" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To test this query really quickly, add another Search Screen and this time select the CrimesByCityState query. When you run this screen, LightSwitch will ask you for the State and City parameters. Because they are both required, once you enter both of them LightSwitch will automatically execute the query. You can choose to make parameters optional in the query designer properties window.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5383.image_5F00_11B603A4.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6557.image_5F00_thumb_5F00_1149D0AF.png" width="787" height="465" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Enhancing the Map Screen with Crime Data&lt;/h4&gt;
&lt;p&gt;Instead of a separate screen we want to display this information on the Map Screen. Open the MapScreen and click &amp;ldquo;Add Data Item&amp;rdquo; at the top of the Screen Designer and select the CrimesByCityState query.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6567.image_5F00_62F04B01.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4810.image_5F00_thumb_5F00_3B49CED7.png" width="521" height="569" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next add two local properties one for City and one for State by clicking Add Data Item again, this time selecting Local Property of type String.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0216.image_5F00_2FB41198.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6471.image_5F00_thumb_5F00_4843AEE8.png" width="499" height="498" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now you need to bind these local properties to the query parameters. In the screen designer, select the query parameter State and in the properties window set the Parameter Binding to &amp;ldquo;State&amp;rdquo;. Repeat for City by selecting the City query parameter and setting the Parameter Binding to &amp;ldquo;City&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6076.image_5F00_79CF1C7D.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5074.image_5F00_thumb_5F00_7962E988.png" width="549" height="273" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You know you have it right when there is a grey arrow from the query parameter to the local property. Finally, select both the local properties and in the property window check &amp;ldquo;Is Parameter&amp;rdquo; for both of them. This will allow us to pass in the city and state from the Project screen.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6457.image_5F00_74EC68C1.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8512.image_5F00_thumb_5F00_748035CC.png" width="553" height="327" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Next, drag the CrimesByCityState from the left onto the content tree where you want it. I&amp;rsquo;ll add it to the top of the screen and I&amp;rsquo;m just going to display the two computed properties, Summary and ViolentCrimeRatio. Also, since we&amp;rsquo;re now filtering the data only a few rows will be returned so I can turn off paging &amp;amp; sorting to save some room on the screen. Select the CrimesByCityState query and in the properties window uncheck &amp;ldquo;Supports paging&amp;rdquo; and &amp;ldquo;Supports searching&amp;rdquo;. Also since this data is read-only, I&amp;rsquo;ll remove all the commands from the data grid row command bar.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1665.image_5F00_00E11B5A.png"&gt;&lt;img style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0675.image_5F00_thumb_5F00_5530515D.png" width="799" height="602" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So after adjusting the visual properties of the screen how we want, the final thing we need to do is pass the city and state into the map screen along with the address. From the ProjectDetail screen select the Show Map button, right-click and select &amp;ldquo;Edit execute code&amp;rdquo;, and adjust the code as follows:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="background: white; color: blue;"&gt;Private Sub &lt;/span&gt;&lt;span style="background: white; color: black;"&gt;ShowMap_Execute() &lt;/span&gt;&lt;span style="background: white; color: green;"&gt;'Show a map of the customer address as well as crime data &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Application.ShowMapScreen(&lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Project.Customer.FullAddress, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Project.Customer.City, &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;Me&lt;/span&gt;&lt;span style="background: white; color: black;"&gt;.Project.Customer.State) &lt;/span&gt;&lt;span style="background: white; color: blue;"&gt;End Sub&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;Now when we run the application, open the Project Detail screen, and click the Show Map button, it will display the crime data from the OData service on the Azure DataMarket.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0184.image_5F00_4626B01F.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8117.image_5F00_thumb_5F00_370FD145.png" width="790" height="718" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Wrap Up&lt;/h3&gt;
&lt;p&gt;I hope this post has demonstrated how you can use data from OData services inside your LightSwitch applications. Keep in mind that not all services provide all operations against the data (for instance the Crime Data is read only) so that using random OData feeds may not be compatible with LightSwitch if they do not support querying, sorting or filtering. We&amp;rsquo;re working on guidance that will detail more about what operations are necessary to have a good LightSwitch experience and we will be working with partners to prepare them as we move from Beta to the final release.&lt;/p&gt;
&lt;p&gt;I have updated the &lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-338952fd" target="_blank"&gt;Contoso Construction application for LightSwitch in Visual Studio 11 Beta&lt;/a&gt; so have a look. There are a lot of new features that I took advantage of in there, not just the crime data OData service.&lt;/p&gt;
&lt;p&gt;In the next post you will see how LightSwitch creates OData services from the data sources you define and how you can write external clients to get to that data, including business rules and user access control. In Visual Studio 11 beta, LightSwitch is the simplest way to create business applications &lt;strong&gt;and data services &lt;/strong&gt;for the desktop and the cloud.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;UPDATE 3/9/2012: Read my next post on OData - &lt;a class="internal-link view-post" href="http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx"&gt;&lt;span&gt;&lt;/span&gt;Creating and Consuming LightSwitch OData Services&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10274896" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/OData/">OData</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>Visual Studio 11 Beta Released!</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/02/29/visual-studio-11-beta-released.aspx</link><pubDate>Wed, 29 Feb 2012 15:43:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10274482</guid><dc:creator>Beth Massi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10274482</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/02/29/visual-studio-11-beta-released.aspx#comments</comments><description>&lt;p&gt;We are extremely happy to announce the release of Microsoft® Visual Studio® 11 Beta! This release also includes the next version of LightSwitch!&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=240160"&gt;&lt;strong&gt;Download Visual Studio 11 Beta&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Please see the &lt;a href="http://blogs.msdn.com/lightswitch"&gt;LightSwitch Team Blog&lt;/a&gt; and the &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh852657"&gt;LightSwitch Beta Resources page on the Developer Center &lt;/a&gt;for information on new features available in LightSwitch. We’ll be rolling out more in-depth content and training in the coming weeks so keep checking back. My personal favorite is the new OData support so you know I’ll be writing a lot about that in the next few days. ;-)&lt;/p&gt;  &lt;p&gt;Read &lt;a href="http://blogs.msdn.com/b/jasonz/archive/2012/02/29/welcome-to-the-beta-of-visual-studio-11-and-net-framework-4-5.aspx"&gt;Jason Zander's blog &lt;/a&gt;for information on new capabilities in Visual Studio 11 and .NET Framework 4.5. &lt;a href="http://www.microsoft.com/visualstudio/en-us/products/go-live"&gt;Beta comes with a “Go Live” license &lt;/a&gt;which means you can now start using Visual Studio LightSwitch for production projects!&lt;/p&gt;  &lt;p&gt;We also created a new forum for Beta. Please post questions and feedback in the &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/LightSwitchDev11Beta/threads"&gt;&lt;strong&gt;LightSwitch in Visual Studio 11 Beta Forum&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10274482" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/VS11/">VS11</category></item><item><title>Trip Report–Techdays 2012 Netherlands</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/02/21/trip-report-techdays-2012-netherlands.aspx</link><pubDate>Tue, 21 Feb 2012 23:21:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10270766</guid><dc:creator>Beth Massi</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10270766</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/02/21/trip-report-techdays-2012-netherlands.aspx#comments</comments><description>&lt;p&gt;Last week I had the pleasure of speaking again at &lt;a href="http://techdays.nl/" target="_blank"&gt;Techdays Netherlands&lt;/a&gt; on &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;Visual Studio LightSwitch&lt;/a&gt;. It’s my third time speaking there and the venue is top-notch at the World Forum in The Hague. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands" target="_blank"&gt;Check out all the session recordings for Techdays 2012 on Channel 9&lt;/a&gt;.&lt;/p&gt;  &lt;h3&gt;Introducing Visual Studio LightSwitch&lt;/h3&gt;  &lt;p&gt;My first session was in a big room that had about 100 people, almost all of them professional developers (they get paid to write code everyday). In this session we build my version of the &lt;a href="http://code.msdn.microsoft.com/Visual-Studio-LightSwitch-c8e92df4"&gt;Vision Clinic application&lt;/a&gt; from scratch, end-to-end, including security and deployment. We do write some code but only some simple business rules and calculated fields, and in the end we have a full-blown business application. The goal is to show what LightSwitch can do for you out of the box without having to know any details of the underlying .NET technologies upon which it is built. The recording is available on Channel 9. I suggest downloading the High Quality WMV:&lt;/p&gt;  &lt;h5&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2146" target="_blank"&gt;&lt;img border="0" alt="Discover What is LightSwitch?" align="left" src="http://i.msdn.microsoft.com/ee402630.Video_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt; &lt;strong&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2146" target="_blank"&gt;Video Presentation: Introduction to Visual Studio LightSwitch&lt;/a&gt;&lt;/strong&gt;&lt;/h5&gt;  &lt;p&gt;When I asked who had &lt;a href="http://www.microsoft.com/visualstudio/en-us/lightswitch/try" target="_blank"&gt;downloaded LightSwitch&lt;/a&gt; already, about 75% raised their hand. I also asked how many people were not professional developers (didn’t get paid to write code) and a few people raised their hand. This is pretty much what I expected since this was a pro developer conference. What I showed in the session is pretty close to what I included in the &lt;a href="http://go.microsoft.com/?linkid=9741442"&gt;LightSwitch Training Kit&lt;/a&gt;. If you look under the “LightSwitch Overview” on the right-hand sidebar on the opening page of the training kit, you will see the complete demo code and demo script that you can use for training folks at your local user groups. :-) &lt;/p&gt;  &lt;p&gt;I also brought some LightSwitch Reviewer’s Guides that marketing created to help convince business decision makers of the value of using LightSwitch. I ran out of them within seconds. I was able to snag the PDF version that you can download here: &lt;/p&gt;  &lt;p&gt;&lt;a href="https://skydrive.live.com/?cid=478C1BCF29534CD8&amp;amp;id=478C1BCF29534CD8%21200" target="_blank"&gt;Visual Studio LightSwitch Reviewer’s Guide&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here are some more resources to check out that will help introduce you to Visual Studio LightSwitch: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt; &amp;amp; &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff938857"&gt;Learning Center&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/01/beginning-lightswitch-getting-started.aspx"&gt;Beginning LightSwitch Article Series&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff938857.aspx"&gt;LightSwitch How Do I Videos&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://bit.ly/LightSwitchSamples"&gt;LightSwitch Samples&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch"&gt;LightSwitch Team Blog&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/vslightswitch"&gt;LightSwitch Forums&lt;/a&gt;&lt;/li&gt;  &lt;/ul&gt;  &lt;h3&gt;LightSwitch Advanced Development and Customization Techniques&lt;/h3&gt;  &lt;p&gt;In this session I showed some more advanced development and different levels of customization that you can do to your LightSwitch applications. There were about 75 people in the session. I was happy to see so many people ready to dive deeper. I started off by showing the Contoso Construction sample application that has some more advanced features like:    &lt;br /&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;“Home screen” with static images and text and completely custom screen layouts&lt;/li&gt;    &lt;li&gt;Personalization with My Appointments displayed on log in &lt;/li&gt;    &lt;li&gt;“Show Map..” links under the addresses in data grids &lt;/li&gt;    &lt;li&gt;Picture editors &lt;/li&gt;    &lt;li&gt;Reporting via COM interop to Word &lt;/li&gt;    &lt;li&gt;Import data from Excel &lt;/li&gt;    &lt;li&gt;Composite LINQ queries to retrieve/aggregate data &lt;/li&gt;    &lt;li&gt;Custom report filter builder&lt;/li&gt;    &lt;li&gt;Sending email in response to events on the save pipeline &lt;/li&gt;  &lt;/ul&gt;  &lt;p&gt;&lt;img border="0" alt="Download Sample" src="http://i.msdn.microsoft.com/ee402630.Download_sm(en-us,MSDN.10).png" /&gt;&lt;a href="http://code.msdn.microsoft.com/Contoso-Construction-9f944948"&gt;Download the Contoso Construction Sample&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2145" target="_blank"&gt;&lt;img border="0" alt="Discover What is LightSwitch?" align="left" src="http://i.msdn.microsoft.com/ee402630.Video_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2145" target="_blank"&gt;Video Presentation: Advanced Development &amp;amp; Customization Techniques&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;This session demonstrated the many levels of LightSwitch customization from simple code customizations and custom classes all the way to building full blown extensions. I showed how to access the code behind queries so you can write more advanced LINQ statements. I showed some advanced layout techniques for screens. I also showed how to flip to File View and access client and server projects in order to add your own classes. We injected some &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/02/09/how-to-send-automated-appointments-from-a-lightswitch-application.aspx"&gt;business rules into the save pipeline in order to email new, updated and canceled appointments&lt;/a&gt;. I also &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/06/22/how-to-create-a-simple-audit-trail-change-log-in-lightswitch.aspx" target="_blank"&gt;showed off the LightSwitch entity API to create an audit trail&lt;/a&gt;, and I &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/09/22/fun-with-the-office-integration-pack-extension-for-lightswitch.aspx" target="_blank"&gt;demonstrated the free Office Integration Pack extension&lt;/a&gt; from Grid Logic to create reports with Word and import data from Excel.&amp;#160;&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;I went through the 6 LightSwitch extensibility points. Shells, themes, screen templates, business types, custom controls and custom data sources. I showed how to install and enable them and then we built a theme. I showed off the &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh304488" target="_blank"&gt;LightSwitch Extensibility Toolkit&lt;/a&gt; which helps LightSwitch extension developers build these types of extensions. LightSwitch extensions are similar to other Visual Studio extensions, they are also VSIX packages you just click on to install and manage via the Tools –&amp;gt; Extension Manager. Here are some more resources for building LightSwitch extensions:     &lt;br /&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh304488" target="_blank"&gt;Extending Visual Studio LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=223400"&gt;LightSwitch Extensibility Samples&lt;/a&gt;&lt;/li&gt;  &lt;/ul&gt;  &lt;p&gt;Also check out all the available &lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?f%5B0%5D.Type=VisualStudioVersion&amp;amp;f%5B0%5D.Value=VSLS&amp;amp;f%5B0%5D.Text=Visual%20Studio%20LightSwitch" target="_blank"&gt;LightSwitch extensions&lt;/a&gt; on Visual Studio Gallery. In particular I recommend these free ones:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/e56d790d-ceea-43e6-8ce2-06d274ef7654"&gt;LightSwitch Metro Theme&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/35c4cf2a-5148-4716-afcf-0ccf8899cabf"&gt;Office Integration Pack&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/Filter-Control-for-Visual-90fb8e93"&gt;Filter Control for Visual Studio LightSwitch&lt;/a&gt;&lt;/li&gt;  &lt;/ul&gt;  &lt;p&gt;As well as ones available from our partners, like:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/2735fe6f-d2ec-447e-b7ee-b5e467de0710"&gt;DevExpress XtraReports for LightSwitch &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/b9072625-0b1d-4e69-b209-26ff2aa154d6?SRC=Featured"&gt;ComponentOne OLAP for LightSwitch &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/9c0ff6c8-9523-4e5b-96c7-543107416fbe"&gt;Document Toolkit for LightSwitch &lt;/a&gt;&lt;/li&gt;  &lt;/ul&gt;  &lt;h3&gt;LightSwitch Masterclass &lt;/h3&gt;  &lt;p&gt;I came in a day early to speak at a local user group outside of Amsterdam at &lt;a href="http://www.sogeti.com/" target="_blank"&gt;Sogeti&lt;/a&gt;. It started off a little loud because we were sitting near the kitchen in the cafeteria but once they cleaned up, it quieted down. I didn’t mind too much because I’m good at yelling ;-). &lt;/p&gt;  &lt;p&gt;There was about 50 people in the Masterclass and I demoed LightSwitch for about two and a half hours. I basically did the two presentations above back-to-back. I got a lot of good feedback and people seemed to really enjoy the class. Afterwards, a lot of us hung out and drank real Heineken and pondered the meaning of software development. Thanks to &lt;a href="http://michiel.vanotegem.nl/default.aspx"&gt;Michiel van Otegem&lt;/a&gt; for organizing this and thanks to all of those who attended. &lt;/p&gt;  &lt;h3&gt;Fun Stuff&lt;/h3&gt;  &lt;p&gt;Anytime you attend a conference you get to have fun, especially ones in the Netherlands ;-). One particular highlight was that I got to meet &lt;a href="http://janvanderhaegen.wordpress.com/" target="_blank"&gt;Jan Van der Haegen&lt;/a&gt; in person. Jan is a “LightSwitch hacker” so-to-speak and avid blogger. He is one of the most passionate people I know about software design and LightSwitch development. He drove 3 hours from Belgium to The Hague to see me and we chatted for hours. He gave me a lot of great feedback about how to improve the LightSwitch development experience and extensibility model. &lt;/p&gt;  &lt;p&gt;We decided to tag along with &lt;a href="http://www.snowball.be/" target="_blank"&gt;Gill Clereen&lt;/a&gt; and &lt;a href="http://www.facebook.com/bartde" target="_blank"&gt;Bart De Smet&lt;/a&gt; for dinner where we talked about life, code and everything in between. Jan and I shared a bottle of wine which was an awesome Petite Syrah from a local (to me) Livermore winery -- Concannon Vineyards. It was so cool to see it on the menu that I had to order it. However we didn’t finish it and in Europe they do not have the concept of take out (a.k.a. doggie bag). So they struggled to find a bag for us and ended up giving us one from what I’m told is a five and dime store. LOL. Here’s a (really bad) picture of Bart holding the bag, Jan in the middle and Gill on the right. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6406.WP_5F00_000770_5F00_2.jpg"&gt;&lt;img style="border: 0px currentcolor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="WP_000770" border="0" alt="WP_000770" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0726.WP_5F00_000770_5F00_thumb.jpg" width="274" height="205" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Until next time, Netherlands!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10270766" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Speaking/">Speaking</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category></item><item><title>LightSwitch Screen Tips: Scrollbars and Splitters</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/02/09/lightswitch-screen-tips-scrollbars-and-splitters.aspx</link><pubDate>Thu, 09 Feb 2012 15:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10265663</guid><dc:creator>Beth Massi</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10265663</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/02/09/lightswitch-screen-tips-scrollbars-and-splitters.aspx#comments</comments><description>&lt;p&gt;Often times in business applications we have a lot of information to present on a screen, and depending on the user’s screen resolution that information may scroll off the page. &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;Visual Studio LightSwitch&lt;/a&gt;’s screen templates are set to automatically apply a vertical scrollbar to screens when this happens, however, sometimes we rather allow the user to resize sections of the screen how they see fit. It’s common in screen design to use splitter controls to do this. Splitters are a useful UI feature where the width or height of a control on the screen can be modified to show more or less information. In this post I’ll show you how you can enable splitter controls to appear in LightSwitch as well as control how scrollbars behave. &lt;/p&gt;  &lt;h3&gt;Create Your Screen&lt;/h3&gt;  &lt;p&gt;First &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff949859" target="_blank"&gt;create a screen&lt;/a&gt; with all the information you want to display. For this example I will use the ContactDetails screens we created in the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/01/26/beginning-lightswitch-address-book-sample.aspx" target="_blank"&gt;Address Book Sample&lt;/a&gt;. In this example, Contacts have many Addresses, PhoneNumbers and EmailAddresses. By default, LightSwitch will place the Contact fields at the top of the screen with a Tab Control of three DataGrids representing the children. &lt;/p&gt;  &lt;p&gt;Here is what the screen looks like:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3782.image_5F00_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8407.image_5F00_thumb_5F00_2.png" width="618" height="492" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;And here is the content tree for the screen:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2627.image_5F00_16.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5857.image_5F00_thumb_5F00_7.png" width="331" height="675" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Scrollbars in LightSwitch&lt;/h3&gt;  &lt;p&gt;Imagine that over time our contacts get more and more email addresses, phone numbers, and/or addresses. If the user’s screen resolution is low (or the size of the application shell is not maximized) then LightSwitch will place a vertical scrollbar on the screen by default (I added the green box for clarity ;-))&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3617.image_5F00_8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6837.image_5F00_thumb_5F00_3.png" width="619" height="418" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This is controlled by selecting the topmost Rows Layout and under the Appearance properties you will see “Vertical Scroll Enabled” checked. Notice there is also a “Horizontal Scroll Enabled” property you can use to enable horizontal scrollbars when needed. All group controls in LightSwitch have these properties (i.e. Rows Layout, Columns Layout, Table Layout)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3782.image_5F00_18.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3617.image_5F00_thumb_5F00_8.png" width="565" height="339" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Leaving this checked however, means that the user cannot see all the email addresses and the First &amp;amp; Last name fields at the same time. There are a couple things we can do here. One is we can disable vertical scroll of the screen. Once we do that LightSwitch will automatically place the scrollbar into the grid itself instead.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6837.image_5F00_20.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2625.image_5F00_thumb_5F00_9.png" width="605" height="389" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;But what if we aren’t using a DataGrid (or list control) below the list of fields? Or what if we want the user to choose how many rows they need to view at a time? In those cases, we can allow the user to resize the panels of information using a splitter. &lt;/p&gt;  &lt;h3&gt;Adding a Horizontal Splitter&lt;/h3&gt;      &lt;p&gt;In order to provide this functionality, we can place a splitter between the list of fields at the top and the tab control below. While the application is running in debug mode, click the “Design Screen” at the top-right of the shell to open &lt;a href="http://msdn.microsoft.com/en-us/library/ff852030.aspx" target="_blank"&gt;Customization Mode&lt;/a&gt;. Select the nested Rows Layout control for Contact and under the sizing properties you will see a check box “Is Row Resizable”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3617.image_5F00_22.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3288.image_5F00_thumb_5F00_10.png" width="685" height="441" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Check that and then click Save to save your changes. You will now see a splitter control that you can use to resize the top and bottom panels. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4452.image_5F00_10.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4278.image_5F00_thumb_5F00_4.png" width="669" height="430" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this case you probably also want to set a minimum and maximum height of this Rows Layout panel so that the user doesn’t use the splitter to wipe the grid completely off the screen. Right now if you take and drag the splitter off the screen, the grid will completely disappear. In order to stop this, you can set the MinHeight and MaxHeight properties. You can enable a scroll bar to appear in the top panel when needed by checking “Vertical Scroll Enabled” as well.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5342.image_5F00_26.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7506.image_5F00_thumb_5F00_12.png" width="561" height="404" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Adding Vertical Splitters&lt;/h3&gt;  &lt;p&gt;You can also add vertical splitters in a similar way. Instead of displaying DataGrids in separate tabs, say we want to display them side-by-side. Open customization mode again and change the Tabs Layout to a Columns Layout.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3617.image_5F00_28.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3276.image_5F00_thumb_5F00_13.png" width="283" height="379" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then select each DataGrid and in the Sizing properties, check “Is Column Resizable”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3386.image_5F00_30.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8081.image_5F00_thumb_5F00_14.png" width="749" height="497" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now you can resize all of the columns containing the DataGrids. The DataGrids will automatically put a horizontal scrollbar at the bottom so users can see all the fields as necessary.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6835.image_5F00_32.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6332.image_5F00_thumb_5F00_15.png" width="694" height="460" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Another Example &lt;/h3&gt;  &lt;p&gt;Splitters and scrollbars really start helping you out when you have sections of information and/or commands that you want to allow the user to resize. Here I modified the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/05/25/contoso-construction-lightswitch-advanced-development-sample.aspx" target="_blank"&gt;Contoso Construction example&lt;/a&gt; to allow resizing of the tab control of commands on the left and the information on the right. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7418.image_5F00_34.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7870.image_5F00_thumb_5F00_16.png" width="675" height="527" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Wrap Up&lt;/h3&gt;  &lt;p&gt;There are a lot of things you can do with the LightSwitch Screen designer in order to provide completely customized layouts. Controlling scrollbars and adding splitters is just another way you can achieve what you want. For more tips and tricks on customizing screens see:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2011/06/23/tips-and-tricks-for-using-the-screen-designer.aspx" target="_blank"&gt;Tips and Tricks for Using the Screen Designer&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/10/06/i-command-you-lightswitch-screen-commands-tips-amp-tricks.aspx"&gt;LightSwitch Screen Commands Tips &amp;amp; Tricks&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/10/17/lightswitch-tips-amp-tricks-on-dnrtv.aspx"&gt;LightSwitch &lt;em&gt;Tips&lt;/em&gt; &amp;amp; &lt;em&gt;Tricks&lt;/em&gt; on dnrTV&lt;/a&gt;&amp;#160;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10265663" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Screens/">Screens</category></item><item><title>LightSwitch Community &amp; Content Rollup–January 2012</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/02/02/lightswitch-community-amp-content-rollup-january-2012.aspx</link><pubDate>Thu, 02 Feb 2012 15:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10263122</guid><dc:creator>Beth Massi</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10263122</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/02/02/lightswitch-community-amp-content-rollup-january-2012.aspx#comments</comments><description>&lt;p&gt;Last Fall I started posting a rollup of interesting community happenings, content, samples and extensions popping up around &lt;a href="http://msdn.com/lightswitch"&gt;Visual Studio LightSwitch&lt;/a&gt;. If you missed those rollups you can check them out here: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/09/29/lightswitch-community-amp-content-rollup-september.aspx"&gt;LightSwitch Community &amp;amp; Content Rollup–September 2011&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/10/31/lightswitch-community-amp-content-rollup-october-2011.aspx"&gt;LightSwitch Community &amp;amp; Content Rollup–October 2011&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/11/30/lightswitch-community-amp-content-rollup-november-2011.aspx"&gt;LightSwitch Community &amp;amp; Content Rollup–November 2011&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/01/05/lightswitch-community-amp-content-rollup-december-2011.aspx"&gt;LightSwitch Community &amp;amp; Content Rollup–December 2011&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Looks like folks took a few well-deserved days to ramp back into the groove after the holidays (including myself). But there were still a lot of awesome things around LightSwitch this month, especially the number of submissions &lt;a href="http://www.codeproject.com/Competitions/524/LightSwitch-Star-Contest.aspx" target="_blank"&gt;The Code Project&lt;/a&gt; had in the LightSwitch Star Contest. A lot of really interesting applications and some great case studies for LightSwitch as well as some for Azure. Check them out…&lt;/p&gt;  &lt;h3&gt;&lt;a href="http://www.codeproject.com/Competitions/524/LightSwitch-Star-Contest.aspx"&gt;“LightSwitch Star” Contest&lt;/a&gt;&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=232292"&gt;&lt;img style="margin: 0px 10px 0px 0px" border="0" alt="“LightSwitch Star” Contest on CodeProject" align="left" src="http://i.msdn.microsoft.com/ff796201.LightSwitchStarContest(en-us,MSDN.10).jpg" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In November The Code Project launched the &lt;a href="http://www.codeproject.com/Competitions/524/LightSwitch-Star-Contest.aspx"&gt;“LightSwitch Star” contest&lt;/a&gt;. They’re looking for apps that show off the most productivity in a business as well as apps that use extensions in a unique, innovative way. Prizes are given away each month. Soon they will announce the January winners as well as the two grand prize winners of an &lt;b&gt;&lt;a href="http://www.amazon.com/U31SD-DH31-13-3-Inch-Light-Laptop-Black/dp/B005PAIQG0/ref=dp_ob_title_ce"&gt;ASUS U31SD-DH31 Laptop&lt;/a&gt;&lt;/b&gt;! &lt;/p&gt;  &lt;p&gt;Check out all the submission we had in January and make sure to log onto Code Project and vote &lt;a href="http://www.codeproject.com/KB/LightSwitch/#LightSwitch+Star+Contest" target="_blank"&gt;for your favorites&lt;/a&gt;. Here’s a breakdown of the 13 apps that were submitted in January (see all &lt;a href="http://www.codeproject.com/KB/LightSwitch/#LightSwitch+Star+Contest"&gt;34 apps that have been submitted here&lt;/a&gt;). There are some very creative “business apps” here – like a campaign manager for Dungeons &amp;amp; Dragons!    &lt;br /&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=G3xQ4bdL6GE&amp;amp;list=FLgFBc_I8vOTYjXOj0uyQTJA&amp;amp;index=5&amp;amp;feature=plpp_video"&gt;Profiling-Pro (video)&lt;/a&gt; – Project profiler that helps make sure your software projects are done on time&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/314201/Luminous-Commands"&gt;Luminous Commands For LightSwitch&lt;/a&gt; - Luminous Commands provides two pieces of functionality that was missing from LS RTM but wanted by many users&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/314208/Access-Control-Manager"&gt;Access Control Manager&lt;/a&gt; - The Access Control Manager tracks user access to applications and other products (such as hardware, cellphones, etc.) by creating requests for access by the supervisor of the user&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/316162/Light-Enterprise-Solution"&gt;Light Enterprise Solution&lt;/a&gt; - An article about applications that is an enterprise system targeted for Small &amp;amp; Medium Enterprises in Malaysia and Singapore&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/316676/Lightswitch-Job-Hunter-Application"&gt;LightSwitch Job Hunter Application&lt;/a&gt; - Job application tracker for those out of work built using Visual Studio LightSwitch 2011.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=ppOb5DHBR-4&amp;amp;list=FLgFBc_I8vOTYjXOj0uyQTJA&amp;amp;index=1&amp;amp;feature=plpp_video"&gt;Job Hunter LightSwitch Application (video)&lt;/a&gt; - This is a demo video of a free application that is intended to help job applicants. The application and source code are free to download&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=fifFyOQuADU&amp;amp;list=FLgFBc_I8vOTYjXOj0uyQTJA&amp;amp;index=2&amp;amp;feature=plpp_video"&gt;Illuminous overview (video)&lt;/a&gt; - Illuminous is a comprehensive college management tool developed using Visual Studio LightSwitch.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/318840/Data-Centre-A-Product-Information-and-Promotion-Ma"&gt;Data Centre: A Product Information and Promotion Management System&lt;/a&gt; - A system for easily and effectively storing product information and managing promotions.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/317928/Visual-Studio-LightSwitch-Application-Database-Scr"&gt;Visual Studio LightSwitch Application Database Script Generator&lt;/a&gt; - A tool to generate Sql server DB script from the LightSwitch internal database&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/319456/MyBizz-Portal-The-smallest-LightSwitch-application" target="_blank"&gt;MyBizz Portal&lt;/a&gt; - The &amp;quot;smallest&amp;quot; LightSwitch application you have ever seen. A portal to other LightSwitch applications.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/321845/Client-Management-System" target="_blank"&gt;Client Management System&lt;/a&gt; - A complete CRM solution that manages the entire customer lifecycle.&lt;/li&gt;    &lt;li&gt;&lt;a href="http://staging.codeproject.com/Articles/322680/BPO-Productivity-Tool" target="_blank"&gt;BPO Productivity Tool&lt;/a&gt; - This is is primarily built as a custom LightSwitch Shell Extension in which I embed PRISM to manage all LightSwitch and non-LightSwitch views. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/322658/Birthright-Campaign-Manager" target="_blank"&gt;Birthright Campaign Manager&lt;/a&gt; - Birthright Campaign Manager is an open source role playing computer aid for Birthright, a campaign setting for Dungeons &amp;amp; Dragons. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;There are a lot of really interesting real-world LightSwitch production applications that were submitted. Some departmental apps, a few personal apps, some enterprise apps as well as a couple start-up companies. There are also some great case studies here for Azure, in particular:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/318840/Data-Centre-A-Product-Information-and-Promotion-Ma"&gt;Data Centre: A Product Information and Promotion Management System&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/316162/Light-Enterprise-Solution"&gt;Light Enterprise Solution&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.codeproject.com/Articles/302593/Orion"&gt;Orion - MiniCRM LightSwitch and Azure&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;    &lt;h3&gt;Developer Center Updates&lt;/h3&gt;  &lt;h5&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff938857"&gt;Learn Page Updates&lt;/a&gt;&lt;/h5&gt;  &lt;p&gt;In December I kicked off a &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/tags/beginning+lightswitch+series/"&gt;series aimed at beginner developers&lt;/a&gt; just getting started with LightSwitch and was featured in the &lt;a href="http://msdn.microsoft.com/en-us/hh708735"&gt;MSDN Flash Newsletter&lt;/a&gt;. In January we updated the &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff938857"&gt;Learn page of the Developer Center&lt;/a&gt; to feature this series and it’s been getting some great traffic!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff938857"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 12px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1777.image_5F00_3.png" width="477" height="418" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I also released the completed source code for the sample we build in the series: &lt;a href="http://code.msdn.microsoft.com/Begining-LightSwitch-508763ea"&gt;Beginning LightSwitch - Address Book Sample&lt;/a&gt;&lt;/p&gt;  &lt;h5&gt;How Do I Videos – Learning Made Easier&lt;/h5&gt;  &lt;p&gt;We also updated all the How Do I video pages to show the sequential list of videos so that you can easily get to the previous and next videos in the series. This makes it a lot easier to navigate through the over 20 videos in the correct order. Just click into &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff949856"&gt;any video page like this one&lt;/a&gt; and you will see the video navigator at the bottom of the page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff949856"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4807.image_5F00_6.png" width="468" height="414" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Notable Content this Month&lt;/h3&gt;  &lt;p&gt;Here’s some more of the fun things the team and community released in January. &lt;/p&gt;  &lt;h6&gt;Extensions released in January (&lt;a href="http://visualstudiogallery.msdn.microsoft.com/site/search?f%5B0%5D.Type=SearchText&amp;amp;f%5B0%5D.Value=LightSwitch&amp;amp;sortBy=Date"&gt;see all 73 of them here!&lt;/a&gt;):&lt;/h6&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/df61b7a8-f3dc-4e91-a544-76acbcc465e9"&gt;Extended Text Box Extension &lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/6cb027ee-cd5f-47a6-ad63-c40a925891e3"&gt;Visual Studio LightSwitch application DB script generator &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The team also released a control extension sample that you can learn from. Check out the announcement on the team blog:&amp;#160; &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/01/17/many-to-many-control-released.aspx"&gt;Many-to-Many Control Released!&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Build your own extensions by visiting the &lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh304488"&gt;LightSwitch Extensibility page&lt;/a&gt; on the &lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt;. &lt;/p&gt;  &lt;h5&gt;Team Articles:&lt;/h5&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/01/30/calling-web-services-to-validate-data-in-visual-studio-lightswitch.aspx"&gt;Calling Web Services to Validate Data in Visual Studio LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/01/26/beginning-lightswitch-address-book-sample.aspx"&gt;Beginning LightSwitch–Address Book Sample&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/01/20/using-different-edit-screens-based-on-record-types-table-inheritance.aspx"&gt;Using Different Edit Screens Based on Record Types (Table Inheritance)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/01/12/creating-cascading-drop-down-lists-in-visual-studio-lightswitch.aspx"&gt;Creating Cascading Drop Down Lists in Visual Studio LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2012/01/12/drop-down-lists-tips-amp-tricks-beth-massi.aspx"&gt;Drop-down Lists Tips &amp;amp; Tricks &lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h6&gt;Community Articles:&lt;/h6&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/90/List-Box-That-Can-Be-Ordered-By-The-End-User.aspx"&gt;List Box That Can Be Ordered By The End-User&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/92/Save-is-a-pain-in-the-As.aspx"&gt;Save (is a pain in the) As&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/93/Using-The-Sheel-Shah-Many-To-Many-Control.aspx"&gt;Using The Many-To-Many Control&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/94/Using-the-ComponentOne-Excel-for-Silverlight-Control-with-LightSwitch.aspx"&gt;Using the ComponentOne Excel for Silverlight Control with LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/95/Application-Logo.aspx"&gt;Application Logo&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/96/A-LightSwitch-Web-Installer-Wizard.aspx"&gt;A LightSwitch Web Installer Wizard&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/97/Creating-a-Visual-Studio-LightSwitch-Screen-Template.aspx"&gt;Creating a Visual Studio LightSwitch Screen Template&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/98/Creating-A-LightSwitch-Theme-Extension-using-Expression-Blend.aspx"&gt;Creating A LightSwitch Theme Extension using Expression Blend&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/01/18/extensions-made-easy-usesmallimage-and-custom-ordering/"&gt;Extensions Made Easy: UseSmallImage and custom ordering.&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/01/17/centric-rad-race-may-the-better-technology-win/"&gt;Centric RAD race: may the better technology win…&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/01/10/lightswitch-achievements-chapter-one-introduction-the-idea/"&gt;LightSwitch Achievements: Chapter one (Introduction) – The idea&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://janvanderhaegen.wordpress.com/2012/01/08/extensions-made-easy-1-11-navigation-sample-explained/"&gt;Extensions made easy 1.11 : navigation sample explained&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://powerbala.com/2012/01/01/extending-lightswitch-textbox-walk-through/"&gt;Extending LightSwitch TextBox : Walk-Through&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchregularguy.wordpress.com/2012/01/27/resources-for-beginners/"&gt;Resources for Beginners&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://lightswitchregularguy.wordpress.com/2012/01/29/an-easy-way-to-create-many-to-many-relationships/"&gt;An Easy Way to Create Many-to-Many Relationships&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h6&gt;&lt;strong&gt;Presentations:&lt;/strong&gt;&lt;/h6&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.techdays.ca/contentlibrary/video/en/2011-lightswich-is-hot!-really-hot!!.aspx"&gt;LightSwitch is Hot! Really Hot!!&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.kunal-chowdhury.com/2012/01/presented-lightswitch-for-business.html"&gt;Presented “LightSwitch for Business Application Development” in Microsoft Monday&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h6&gt;Samples (&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/hh204519"&gt;see all of them here&lt;/a&gt;):&lt;/h6&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/Extended-Text-Box-b8c7b911"&gt;Extended Text Box Extension - Source Code&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/NavigationDemo-having-some-f2629c9c"&gt;NavigationDemo: having some fun in LightSwitch with the EME navigation model&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/Many-to-Many-Control-for-52cd8c6c"&gt;Many to Many Control for Visual Studio LightSwitch&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/Begining-LightSwitch-508763ea"&gt;Beginning LightSwitch - Address Book Sample&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h5&gt;LightSwitch Team Community Sites&lt;/h5&gt;  &lt;p&gt;&lt;a href="http://www.facebook.com/vslightswitch"&gt;&lt;img style="margin: 0px 6px 0px 0px" border="0" alt="" align="left" src="http://badge.facebook.com/badge/151211271561073.1904.953280091.png" width="137" height="84" /&gt;&lt;/a&gt; The &lt;a href="http://www.facebook.com/vslightswitch"&gt;Visual Studio LightSwitch Facebook Page&lt;/a&gt; has been increasing in activity thanks to you all. Become a fan! Have fun and interact with us on our wall. Check out the cool stories and resources. &lt;/p&gt;  &lt;p&gt;Also here are some other places you can find the LightSwitch team: &lt;/p&gt;  &lt;p&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/category/vslightswitch"&gt;LightSwitch MSDN Forums&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/lightswitch"&gt;LightSwitch Team Blog&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://twitter.com/#!/VSLightSwitch"&gt;LightSwitch on Twitter&lt;/a&gt; (@VSLightSwitch, #VisualStudio #LightSwitch) &lt;/p&gt;  &lt;h6&gt;Join Us!&lt;/h6&gt;  &lt;p&gt;The community has been using the hash tag #LightSwitch on twitter when posting stuff so it’s easier for me to catch it (although this is a common English word so you may end up with a few weird ones ;-)). &lt;a href="http://twitter.com/#!/search/realtime/%23LightSwitch"&gt;Join the conversation!&lt;/a&gt; And if I missed anything please add a comment to the bottom of this post and let us know!&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10263122" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Community/">Community</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Samples/">Samples</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Rollup/">Rollup</category></item><item><title>Calling Web Services to Validate Data in Visual Studio LightSwitch</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/01/30/calling-web-services-to-validate-data-in-visual-studio-lightswitch.aspx</link><pubDate>Mon, 30 Jan 2012 14:15:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10261345</guid><dc:creator>Beth Massi</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10261345</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/01/30/calling-web-services-to-validate-data-in-visual-studio-lightswitch.aspx#comments</comments><description>&lt;p&gt;Very often in business applications we need to validate data through another service. I’m not talking about validating the format of data entered – this is very simple to do in LightSwitch -- I’m talking about validating the &lt;strong&gt;meaning &lt;/strong&gt;of the data. For instance, you may need to validate not just the format of an email address (which LightSwitch handles automatically for you) but you also want to verify that the email address is real. Another common example is physical Address validation in order to make sure that a postal address is real before you send packages to it. &lt;/p&gt;  &lt;p&gt;In this post I’m going to show you how you can call web services when validating LightSwitch data. I’m going to use the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/01/26/beginning-lightswitch-address-book-sample.aspx" target="_blank"&gt;Address Book sample&lt;/a&gt; and implement an Address validator that calls a service to verify the data. &lt;/p&gt;  &lt;h3&gt;Where Do We Call the Service?&lt;/h3&gt;  &lt;p&gt;In &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;Visual Studio LightSwitch&lt;/a&gt; there are a few places where you can place code to validate entities. There are &lt;em&gt;Property&lt;/em&gt;_Validate methods and there are &lt;em&gt;Entity&lt;/em&gt;_Validate methods. &lt;em&gt;Property&lt;/em&gt;_Validate methods run first on the client and then on the server and are good for checking the format of data entered, doing any comparisons to other properties, or manipulating the data based on conditions stored in the entity itself or its related entities. Usually you want to put your validation code here so that users get immediate feedback of any errors before the data is submitted to the server. These methods are contained on the entity classes themselves. (For more detailed information on the LightSwitch Validation Framework see: &lt;a href="http://blogs.msdn.com/b/lightswitch/archive/2010/08/30/overview-of-data-validation-in-lightswitch-applications-prem-ramanathan.aspx" target="_blank"&gt;Overview of Data Validation in LightSwitch Applications&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;The &lt;em&gt;Entity&lt;/em&gt;_Validate methods only run on the server and are contained in the ApplicationDataService class. This is the perfect place to call an external validation service because it avoids having clients calling external services directly -- instead the LightSwitch middle-tier makes the call. This gives you finer control over your network traffic. Client applications may only be allowed to connect to your intranet internally but you can allow external traffic to the server managing the external connection in one place. &lt;/p&gt;  &lt;h3&gt;Calling Web Services&lt;/h3&gt;  &lt;p&gt;There are a lot of services out there for validating all sorts of data and each service has a different set of requirements. Typically I prefer &lt;a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank"&gt;REST-ful services&lt;/a&gt; so that you can make a simple http request (GET) and get some data back. However, you can also add service references like ASMX and WCF services as well. It’s all going to depend on the service you use so you’ll need to refer to their specific documentation. &lt;/p&gt;  &lt;p&gt;To add a service reference to a LightSwitch application, first flip to File View in the Solution Explorer, right-click on the Server project and then select Add Service Reference…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8168.image_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2783.image_5F00_thumb.png" width="555" height="460" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enter the service URL and the service proxy classes will be generated for you. You can then call these from server code you write on the ApplicationDataService just like you would in any other application that has a service reference. In the case of calling REST-ful services that return XML feeds, you can simply construct the URL to call and examine the results. Let’s see how to do that.&lt;/p&gt;  &lt;h3&gt;Address Book Example&lt;/h3&gt;  &lt;p&gt;In &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2012/01/26/beginning-lightswitch-address-book-sample.aspx" target="_blank"&gt;this sample&lt;/a&gt; we have an Address table where we want to validate the physical address when the data is saved. There are a few address validator services out there to choose from that I could find, but for this example I chose to sign up for a free trial of an &lt;a href="http://www.serviceobjects.com/lookups/address/address-validation-us" target="_blank"&gt;address validation service from ServiceObjects&lt;/a&gt;. They’ve got some &lt;a href="http://trial.serviceobjects.com/av/AddressValidate.asmx?op=ValidateAddress" target="_blank"&gt;nice, simple APIs&lt;/a&gt; and support REST web requests. Once you sign up they give you a License Key that you need to pass into the service.&lt;/p&gt;  &lt;p&gt;A sample request looks like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;http://trial.serviceobjects.com/av/AddressValidate.asmx/ValidateAddress?Address=One+Microsoft+Way&amp;amp;Address2=&amp;amp;City=Redmond&amp;amp;State=WA&amp;amp;PostalCode=98052&amp;amp;LicenseKey=12345&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Which gives you back the result:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #844646"&gt;xml &lt;/span&gt;&lt;span style="color: #b96464"&gt;version&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;1.0&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot; &lt;/span&gt;&lt;span style="color: #b96464"&gt;encoding&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;UTF-8&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Address &lt;/span&gt;&lt;span style="color: #b96464"&gt;xmlns&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;http://www.serviceobjects.com/&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;
&lt;/span&gt;&lt;span style="color: #b96464"&gt;  xmlns:xsi&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;
  &lt;/span&gt;&lt;span style="color: #b96464"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Address&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;1 Microsoft Way&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;Address&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;City&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;Redmond&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;City&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;State&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;WA&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;State&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Zip&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;98052-8300&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;Zip&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Address2&lt;/span&gt;&lt;span style="color: #6464b9"&gt;/&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;BarcodeDigits&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;980528300997&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;BarcodeDigits&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;CarrierRoute&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;C012&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;CarrierRoute&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;CongressCode&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;08&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;CongressCode&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;CountyCode&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;033&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;CountyCode&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;CountyName&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;King&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;CountyName&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Fragment&lt;/span&gt;&lt;span style="color: #6464b9"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;Address&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;If you enter a bogus address or forget to specify the City+State or PostalCode then you will get an error result:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #844646"&gt;xml &lt;/span&gt;&lt;span style="color: #b96464"&gt;version&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;1.0&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot; &lt;/span&gt;&lt;span style="color: #b96464"&gt;encoding&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;UTF-8&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;?&amp;gt;
&amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Address &lt;/span&gt;&lt;span style="color: #b96464"&gt;xmlns&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;http://www.serviceobjects.com/&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;
  &lt;/span&gt;&lt;span style="color: #b96464"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;
  &lt;/span&gt;&lt;span style="color: #b96464"&gt;xmlns:xsd&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
  &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Error&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Desc&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;Please input either zip code or both city and state.&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;Desc&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Number&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #555555"&gt;2&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;Number&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #844646"&gt;Location&lt;/span&gt;&lt;span style="color: #6464b9"&gt;/&amp;gt;
  &amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;Error&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #844646"&gt;Address&lt;/span&gt;&lt;span style="color: #6464b9"&gt;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;So in order to interact with this service we’ll first need to add some assembly references to the Server project. Right-click on the Server project (like shown above) and select “Add Reference” and import System.Web and System.Xml.Linq.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4035.image_5F00_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8156.image_5F00_thumb_5F00_1.png" width="704" height="693" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, flip back to Logical View and open the Address entity in the Data Designer. Drop down the Write Code button to access the Addresses_Validate method. (You could also just open the Server\UserCode\ApplicationDataService code file if you are in File View). &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3872.image_5F00_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3060.image_5F00_thumb_5F00_2.png" width="277" height="423" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First we need to import some namespaces as well as the default XML namespace that is returned in the response. (For more information on XML in Visual Basic please see: &lt;a href="http://msdn.microsoft.com/en-us/library/bb384460.aspx"&gt;Overview of LINQ to XML in Visual Basic&lt;/a&gt; and &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/tags/xml/article/" target="_blank"&gt;articles here on my blog&lt;/a&gt;.) Then we can construct the URL based on the entity’s Address properties and query the result XML for either errors or the corrected address. If we find an error, we tell LightSwitch to display the validation result to the user on the screen. &lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Imports &lt;/span&gt;System.Xml.Linq
&lt;span style="color: blue"&gt;Imports &lt;/span&gt;System.Web.&lt;span style="color: #2b91af"&gt;HttpUtility
&lt;/span&gt;&lt;span style="color: blue"&gt;Imports &lt;/span&gt;&amp;lt;&lt;span style="color: #b96464"&gt;xmlns&lt;/span&gt;&lt;span style="color: #6464b9"&gt;=&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #6464b9"&gt;http://www.serviceobjects.com/&lt;/span&gt;&lt;span style="color: #555555"&gt;&amp;quot;&lt;/span&gt;&amp;gt;

&lt;span style="color: blue"&gt;Namespace &lt;/span&gt;LightSwitchApplication
&lt;span style="color: blue"&gt;  Public Class &lt;/span&gt;&lt;span style="color: #2b91af"&gt;ApplicationDataService

    &lt;/span&gt;&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;Addresses_Validate(entity &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Address&lt;/span&gt;, results &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;EntitySetValidationResultsBuilder&lt;/span&gt;)
      &lt;span style="color: blue"&gt;Dim &lt;/span&gt;isValid = &lt;span style="color: blue"&gt;False
      Dim &lt;/span&gt;errorDesc = &lt;span style="color: #a31515"&gt;&amp;quot;&amp;quot;

      &lt;/span&gt;&lt;span style="color: green"&gt;'Construct the URL to call the web service
      &lt;/span&gt;&lt;span style="color: blue"&gt;Dim &lt;/span&gt;url = &lt;span style="color: blue"&gt;String&lt;/span&gt;.Format(&lt;span style="color: #a31515"&gt;&amp;quot;http://trial.serviceobjects.com/av/AddressValidate.asmx/ValidateAddress?&amp;quot; &lt;/span&gt;&amp;amp;
                              &lt;span style="color: #a31515"&gt;&amp;quot;Address={0}&amp;amp;Address2={1}&amp;amp;City={2}&amp;amp;State={3}&amp;amp;PostalCode={4}&amp;amp;LicenseKey={5}&amp;quot;&lt;/span&gt;,
                              UrlEncode(entity.Address1),
                              UrlEncode(entity.Address2),
                              UrlEncode(entity.City),
                              UrlEncode(entity.State),
                              UrlEncode(entity.ZIP),
                              &lt;span style="color: #a31515"&gt;&amp;quot;12345&amp;quot;&lt;/span&gt;)

      &lt;span style="color: blue"&gt;Try
          &lt;span style="color: green"&gt;'Call the service and load the XML result &lt;/span&gt;&lt;br /&gt;          Dim &lt;/span&gt;addressData = &lt;span style="color: #2b91af"&gt;XElement&lt;/span&gt;.Load(url)

          &lt;span style="color: green"&gt;'Check for errors first
          &lt;/span&gt;&lt;span style="color: blue"&gt;Dim &lt;/span&gt;err = addressData&lt;span style="color: #6464b9"&gt;...&amp;lt;&lt;/span&gt;Error&lt;span style="color: #6464b9"&gt;&amp;gt;
          &lt;/span&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;err.Any &lt;span style="color: blue"&gt;Then
              &lt;/span&gt;errorDesc = err&lt;span style="color: #6464b9"&gt;.&amp;lt;&lt;/span&gt;Desc&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;.Value
          &lt;span style="color: blue"&gt;Else
              &lt;/span&gt;&lt;span style="color: green"&gt;'Fill in corrected address values returned from service
              &lt;/span&gt;entity.Address1 = addressData&lt;span style="color: #6464b9"&gt;.&amp;lt;&lt;/span&gt;Address&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;.Value
              entity.Address2 = addressData&lt;span style="color: #6464b9"&gt;.&amp;lt;&lt;/span&gt;Address2&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;.Value
              entity.City = addressData&lt;span style="color: #6464b9"&gt;.&amp;lt;&lt;/span&gt;City&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;.Value
              entity.State = addressData&lt;span style="color: #6464b9"&gt;.&amp;lt;&lt;/span&gt;State&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;.Value
              entity.ZIP = addressData&lt;span style="color: #6464b9"&gt;.&amp;lt;&lt;/span&gt;Zip&lt;span style="color: #6464b9"&gt;&amp;gt;&lt;/span&gt;.Value
              isValid = &lt;span style="color: blue"&gt;True
          End If

      Catch &lt;/span&gt;ex &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Exception
          Trace&lt;/span&gt;.TraceError(ex)
      &lt;span style="color: blue"&gt;End Try

      If Not &lt;/span&gt;(isValid) &lt;span style="color: blue"&gt;Then
          &lt;/span&gt;results.AddEntityError(&lt;span style="color: #a31515"&gt;&amp;quot;This is not a valid US address. &amp;quot; &lt;/span&gt;&amp;amp; errorDesc)
      &lt;span style="color: blue"&gt;End If
    End Sub
  End Class
End Namespace&lt;/span&gt;&lt;/pre&gt;

&lt;h3&gt;Run it!&lt;/h3&gt;

&lt;p&gt;Now that I’ve got this code implemented let’s enter some addresses on our contact screen. Here I’ve entered three addresses, the first two are legal and the last one is not. Also notice that I’ve only specified partial addresses.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6014.image_5F00_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4454.image_5F00_thumb_5F00_3.png" width="637" height="299" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I try to save this screen, an error will be returned from the service on the last row. LightSwitch won’t let us save until the address is fixed.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3056.image_5F00_10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5444.image_5F00_thumb_5F00_4.png" width="633" height="323" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If I delete the bogus address and save again, you will see that the other addresses were verified and all the fields are updated with complete address information.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/23602.image_5F00_12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3872.image_5F00_thumb_5F00_5.png" width="631" height="274" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;&lt;/h3&gt;

&lt;h3&gt;Wrap Up&lt;/h3&gt;

&lt;p&gt;I hope this gives you a good idea on how to implement web service calls into the LightSwitch validation pipeline. Even though each service you use will have different requirements on how to call them and what they return, the LightSwitch validation pipeline gives you the necessary hooks to implement complex entity validation easily. &lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10261345" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Validation/">Validation</category></item><item><title>Beginning LightSwitch–Address Book Sample</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/01/26/beginning-lightswitch-address-book-sample.aspx</link><pubDate>Thu, 26 Jan 2012 20:48:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10260990</guid><dc:creator>Beth Massi</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10260990</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/01/26/beginning-lightswitch-address-book-sample.aspx#comments</comments><description>&lt;p&gt;Some folks have been asking for this so I just released the completed Address Book sample that you build step-by-step in the &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/01/beginning-lightswitch-getting-started.aspx"&gt;Beginning LightSwitch Article Series&lt;/a&gt;. &lt;/p&gt;  &lt;h3&gt;&lt;a href="http://code.msdn.microsoft.com/Begining-LightSwitch-508763ea" target="_blank"&gt;&lt;img border="0" alt="Download Sample" src="http://i.msdn.microsoft.com/ee402630.Download_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://code.msdn.microsoft.com/Begining-LightSwitch-508763ea" target="_blank"&gt;Download the Address Book Sample&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;Read the Series&lt;/h3&gt;  &lt;p&gt;Are you completely new to LightSwitch and software development? Read this entry-level article series to get started with the most important concepts you need to build any LightSwitch application.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/06/beginning-lightswitch-part-1-what-s-in-a-table-describing-your-data.aspx"&gt;Part 1: What’s in a Table? Describing Your Data&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/08/beginning-lightswitch-part-2-feel-the-love-defining-data-relationships.aspx"&gt;Part 2: Feel the Love. Defining Data Relationships&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/14/beginning-lightswitch-part-3-screen-templates-which-one-do-i-choose.aspx"&gt;Part 3: Screen Templates, Which One Do I Choose?&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/15/beginning-lightswitch-part-4-too-much-information-sorting-and-filtering-data-with-queries.aspx"&gt;Part 4: Too much information! Sorting and Filtering Data with Queries&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/20/beginning-lightswitch-part-5-may-i-defining-user-permissions.aspx"&gt;Part 5: May I? Controlling Access with User Permissions&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/12/21/beginning-lightswitch-part-6-i-feel-pretty-customizing-the-quot-look-and-feel-quot-with-themes.aspx"&gt;Part 6: I Feel Pretty! Customizing the &amp;quot;Look and Feel&amp;quot; with Themes&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;More Information&lt;/h3&gt;  &lt;p&gt;Visit the &lt;a href="http://msdn.com/lightswitch"&gt;LightSwitch Developer Center&lt;/a&gt; to download LightSwitch and get started learning.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=211226"&gt;&lt;img border="0" alt="" src="http://i.msdn.microsoft.com/ee402630.Numeral1_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=211226"&gt;Download Visual Studio LightSwitch&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/gg604823"&gt;&lt;img border="0" alt="" src="http://i.msdn.microsoft.com/ee402630.Numeral2_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/gg604823"&gt;Watch the instructional LightSwitch &amp;quot;How Do I?&amp;quot; videos&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff938857"&gt;&lt;img border="0" alt="Get essential training" src="http://i.msdn.microsoft.com/ee402630.Numeral3_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt;&lt;a href="http://msdn.microsoft.com/en-us/lightswitch/ff938857"&gt;Get essential training&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-us/category/vslightswitch"&gt;&lt;img border="0" alt="" src="http://i.msdn.microsoft.com/ee402630.Numeral4_sm(en-us,MSDN.10).png" /&gt;&lt;/a&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-us/category/vslightswitch"&gt;Ask questions in the LightSwitch forums&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://blogs.msdn.com/aggbug.aspx?PostID=10260990" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Samples/">Samples</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Beginning+LightSwitch+Series/">Beginning LightSwitch Series</category></item><item><title>Using Different Edit Screens Based on Record Types (Table Inheritance)</title><link>http://blogs.msdn.com/b/bethmassi/archive/2012/01/20/using-different-edit-screens-based-on-record-types-table-inheritance.aspx</link><pubDate>Fri, 20 Jan 2012 14:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10258714</guid><dc:creator>Beth Massi</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/bethmassi/rsscomments.aspx?WeblogPostID=10258714</wfw:commentRss><comments>http://blogs.msdn.com/b/bethmassi/archive/2012/01/20/using-different-edit-screens-based-on-record-types-table-inheritance.aspx#comments</comments><description>&lt;p&gt;I had a reader ask a question this week on how to use &lt;a href="http://msdn.com/lightswitch" target="_blank"&gt;Visual Studio LightSwitch&lt;/a&gt; to open different Edit Detail screens based on the “type” of record. This is a very common thing to do especially for data models that use table inheritance (or sub-tables). For instance say we are building an application for a pet store to manage their inventory of animals. We need to collect shared properties of all the animals in an Animal table but we also want to set up table inheritance to Fish, Cat and Dog tables which collect specific properties of those types of animals. When a user selects an animal on a search screen, we need to display a screen that lets them work with the correct data from the specific table. LightSwitch provides a “Show as Link” on labels which automatically opens up the default details screen for that entity, but in our case we could have multiple screens. There are also a few techniques you need to know when dealing with these types of relationships in LightSwitch, particularly around the insert pipeline. In this post I will show you how you can achieve this functionality. &lt;/p&gt;  &lt;h3&gt;Create The Data Model&lt;/h3&gt;  &lt;p&gt;First let’s start by creating a simple inheritance data model for the pet store. We will build an Animal table that collects general properties of any animal in the store. Then we will build Cat, Dog and Fish tables to collect specific properties of those types of animals. The relationship between the Animal table and the others will be a ‘one to zero or one’ relationship. &lt;/p&gt;  &lt;p&gt;For this example, the Animal table has two required properties, Name and Type. Type is a Choice List with the static values “Cat”, “Dog”, “Fish” to correspond to the type of record the animal is. We will use this to drive what records are inserted into which specific table as well as use it to determine which screens to display. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0116.image_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/7382.image_5F00_thumb.png" width="677" height="507" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next, create the Cat, Dog and Fish tables to collect properties specific to these types of animals.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6403.image_5F00_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2570.image_5F00_thumb_5F00_1.png" width="701" height="436" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Finally, set up the relationships from Animal to these tables as a “one to zero or one” relationship with a delete behavior of “Cascade Delete”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8037.image_5F00_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3644.image_5F00_thumb_5F00_2.png" width="500" height="488" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Our data model now looks like this.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5707.image_5F00_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3247.image_5F00_thumb_5F00_3.png" width="661" height="491" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Create the Screens&lt;/h3&gt;  &lt;p&gt;Next we’ll need to enter new animals into the system. Create a New Data Screen and select Animal as the screen data. When you do this, LightSwitch will include all the one-to-one related tables as fields on the screen. However, we only want to require the user to enter the general Animal properties on this screen. Once they save, we will direct them to the correct Cat, Dog or Fish detail screen. So first delete all the items in the content tree of the Screen Designer except for Name and Type.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8831.image_5F00_10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3666.image_5F00_thumb_5F00_4.png" width="506" height="248" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Next, create an Edit Details Screen and select the &lt;strong&gt;Animal&lt;/strong&gt; screen data again. Name the screen CatDetail and &lt;strong&gt;uncheck &lt;/strong&gt;“Use as Default Details Screen”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6862.image_5F00_12.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4237.image_5F00_thumb_5F00_5.png" width="706" height="503" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Again you will see that LightSwitch reads these special relationships and adds all the fields from all four tables to the screen. We will need to make some changes. First, change the “Type” from an Auto Complete box to a Label. Once the user has entered the type of animal on the New Data screen, it cannot be changed. Next, delete all the fields related to Dog and Fish from the screen. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4705.image_5F00_14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/4621.image_5F00_thumb_5F00_6.png" width="464" height="299" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Repeat the same process to create the DogDetail and FishDetail screens, removing the fields from the screen that do not belong. &lt;/p&gt;  &lt;p&gt;Finally, add a Search Data Screen and select the Animal as the screen data again. Select the “Name” content item and in the properties window uncheck “Show as Link”. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/8422.image_5F00_20.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6036.image_5F00_thumb_5F00_9.png" width="692" height="241" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Instead of using the built-in “Show as Link” functionality, we need to create our own command. We can put commands anywhere on the screen and we can show them as buttons or links. (For more information see: &lt;a href="http://blogs.msdn.com/b/bethmassi/archive/2011/10/06/i-command-you-lightswitch-screen-commands-tips-amp-tricks.aspx" target="_blank"&gt;“I Command You!” - LightSwitch Screen Commands Tips &amp;amp; Tricks&lt;/a&gt;) For instance we could put an edit button on the screen command bar, the grid command bar, or even in the row itself. Let’s add a command into the row itself.&lt;/p&gt;  &lt;p&gt;Right-click on the Data Grid Row Command Bar in the content tree and select “Add Button…”. Create a new method called “Edit”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6763.image_5F00_18.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0083.image_5F00_thumb_5F00_8.png" width="411" height="231" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We want to show the command as a link instead of a button so select the button in the content tree and change it to a link.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/3323.image_5F00_22.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/0576.image_5F00_thumb_5F00_10.png" width="489" height="294" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;Write the Code&lt;/h3&gt;  &lt;p&gt;Now we need to write some code to pull this all together. Right-click on the button we just created and select “Edit Execute Code” to open the code editor. Here we will check what type of animal we have to open the corresponding screen.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;Edit_Execute()
    &lt;span style="color: blue"&gt;If Me&lt;/span&gt;.Animals.SelectedItem &lt;span style="color: blue"&gt;IsNot Nothing Then
        Select Case Me&lt;/span&gt;.Animals.SelectedItem.Type
            &lt;span style="color: blue"&gt;Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Cat&amp;quot;
                &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Application.ShowCatDetail(&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Animals.SelectedItem.Id)
            &lt;span style="color: blue"&gt;Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Dog&amp;quot;
                &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Application.ShowDogDetail(&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Animals.SelectedItem.Id)
            &lt;span style="color: blue"&gt;Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Fish&amp;quot;
                &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Application.ShowFishDetail(&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Animals.SelectedItem.Id)
        &lt;span style="color: blue"&gt;End Select
    End If
End Sub&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Next we need to write similar code on the New Data screen so that it opens the correct detail screen after the user saves a new animal record. Open the CreateNewAnimal screen and in the upper right drop down the “Write Code” button and select the CreateNewAnimal_Saved method. First comment out the call to ShowDefaultScreen and then write code to determine which screen we need to show instead:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;CreateNewAnimal_Saved()
&lt;span style="color: blue"&gt;    Me&lt;/span&gt;.Close(&lt;span style="color: blue"&gt;False&lt;/span&gt;)
    &lt;span style="color: green"&gt;'Application.Current.ShowDefaultScreen(Me.AnimalProperty)

    &lt;/span&gt;&lt;span style="color: blue"&gt;Select Case Me&lt;/span&gt;.AnimalProperty.Type
        &lt;span style="color: blue"&gt;Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Cat&amp;quot;
            &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Application.ShowCatDetail(&lt;span style="color: blue"&gt;Me&lt;/span&gt;.AnimalProperty.Id)
        &lt;span style="color: blue"&gt;Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Dog&amp;quot;
            &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Application.ShowDogDetail(&lt;span style="color: blue"&gt;Me&lt;/span&gt;.AnimalProperty.Id)
        &lt;span style="color: blue"&gt;Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Fish&amp;quot;
            &lt;/span&gt;&lt;span style="color: blue"&gt;Me&lt;/span&gt;.Application.ShowFishDetail(&lt;span style="color: blue"&gt;Me&lt;/span&gt;.AnimalProperty.Id)
    &lt;span style="color: blue"&gt;End Select
End Sub&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Finally, we need to implement a business rule on Animal in the save pipeline. This rule is important so that a new record is added to the correct table based on the animal’s type. That way after the user saves the CreateNewAnimal screen, a record will be written to the correct table and the detail screen will open and allow the user to edit the specific fields in the Cat, Dog or Fish table. Double-click on Animals in the Solution Explorer under the Data Sources/ApplicationData node to open the Data Designer. Drop down the Write Code button and select the Animals_Inserting method and write this code:&lt;/p&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;Private Sub &lt;/span&gt;Animals_Inserting(entity &lt;span style="color: blue"&gt;As &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Animal&lt;/span&gt;)
    &lt;span style="color: blue"&gt;Select Case &lt;/span&gt;entity.Type
        &lt;span style="color: blue"&gt;Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Cat&amp;quot;
            &lt;/span&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;entity.Cat &lt;span style="color: blue"&gt;Is Nothing Then
                &lt;/span&gt;entity.Cat = &lt;span style="color: blue"&gt;New &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Cat&lt;/span&gt;()
            &lt;span style="color: blue"&gt;End If
        Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Dog&amp;quot;
            &lt;/span&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;entity.Dog &lt;span style="color: blue"&gt;Is Nothing Then
                &lt;/span&gt;entity.Dog = &lt;span style="color: blue"&gt;New &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Dog&lt;/span&gt;()
            &lt;span style="color: blue"&gt;End If
        Case &lt;/span&gt;&lt;span style="color: #a31515"&gt;&amp;quot;Fish&amp;quot;
            &lt;/span&gt;&lt;span style="color: blue"&gt;If &lt;/span&gt;entity.Fish &lt;span style="color: blue"&gt;Is Nothing Then
                &lt;/span&gt;entity.Fish = &lt;span style="color: blue"&gt;New &lt;/span&gt;&lt;span style="color: #2b91af"&gt;Fish&lt;/span&gt;()
            &lt;span style="color: blue"&gt;End If
    End Select
End Sub&lt;/span&gt;&lt;/pre&gt;


&lt;h3&gt;Run it!&lt;/h3&gt;

&lt;p&gt;Enter new animals on the Create New Animal screen and when you click Save, the correct detail screen will open allowing you to enter more specific details based on the type of animal.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/5850.image_5F00_26.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/6443.image_5F00_thumb_5F00_12.png" width="546" height="199" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On our search screen, we can click the Edit link on any of the rows and it will open to the correct details screen as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/2543.image_5F00_28.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-81-88-metablogapi/1641.image_5F00_thumb_5F00_13.png" width="543" height="213" /&gt;&lt;/a&gt;&lt;/p&gt;





&lt;h3&gt;Wrap Up&lt;/h3&gt;

&lt;p&gt;I hope this post answered the reader’s question on how to open different detail screens depending on the record’s type. All it takes is implementing your own command. I also touched on one to one relationships and how to set up basic table inheritance. I encourage you to experiment more with this type of relationship. They come in particularly handy when you need to extend external data sources with additional properties or when you need to set up inheritance hierarchies. The trick is to get a record inserted into the right table when you insert the master / parent record. I’ll expand on a couple other techniques in a future post.&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10258714" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/DevCenter/">DevCenter</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Article/">Article</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Data/">Data</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/LightSwitch/">LightSwitch</category><category domain="http://blogs.msdn.com/b/bethmassi/archive/tags/Screens/">Screens</category></item></channel></rss>
