<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LightSwitch Tutorial</title>
	<atom:link href="http://www.lightswitchtutorial.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lightswitchtutorial.com</link>
	<description></description>
	<lastBuildDate>Tue, 17 May 2011 06:40:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>LightSwitch Tutorial &#8211; Creating a Basic Application</title>
		<link>http://www.lightswitchtutorial.com/2010/08/lightswitch-tutorial-creating-a-basic-application/</link>
		<comments>http://www.lightswitchtutorial.com/2010/08/lightswitch-tutorial-creating-a-basic-application/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 15:56:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://www.lightswitchtutorial.com/?p=9</guid>
		<description><![CDATA[This tutorial will demonstrate the creation of a simple LightSwitch application which will be a simple customers application with a single table of customers. Create a New LightSwitch Project Start up Visual Studio LightSwitch from Start &#62; All Programs &#62; Microsoft &#8230; <a href="http://www.lightswitchtutorial.com/2010/08/lightswitch-tutorial-creating-a-basic-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This tutorial will demonstrate the creation of a simple LightSwitch application which will be a simple customers application with a single table of customers.</p>
<h3>Create a New LightSwitch Project</h3>
<ol>
<li>Start up Visual Studio LightSwitch from <strong>Start &gt; All Programs &gt; Microsoft Visual Studio 2010 &gt; Microsoft Visual Studio 2010</strong>.</li>
<li>Select <strong>File &gt;</strong> <strong>New Project </strong>and the <strong>New Project</strong> dialog box will appear.</li>
<li>From the <strong>Installed Templates</strong> listing, select the <strong>LightSwitch</strong>. (Note that if you are using the full version of Visual Studio Professional with LightSwitch installed you will be shown more templates than just the LightSwitch templates).</li>
<li>Select the <strong>LightSwitch Application (Visual Basic) </strong>template which we will use for this demo and enter a name for the project (in this case I have used <em>lightswitchdemo</em>)<img class="alignnone size-full wp-image-14" title="LightSwitch Tutorial" src="http://www.lightswitchtutorial.com/wp-content/uploads/2010/08/ScreenHunter_08-Aug.-26-18.58.gif" alt="LightSwitch Tutorial" width="656" height="416" /><img class="alignnone size-full wp-image-27" title="LightSwitch Screen Properties" src="http://www.lightswitchtutorial.com/wp-content/uploads/2010/08/ScreenHunter_16-Aug.-26-20.02-e1282824190660.gif" alt="LightSwitch Screen Properties" width="240" height="450" /></li>
<li>Once the application has been created you will be shown an option to either Create a New Table (if the app is being created with an all new database) or Attach to External Database if you need to use LightSwitch as a front-end to an existing database. For this tutorial we will select Create a New Table:<br />
<img class="alignnone size-full wp-image-15" title="LightSwitch 1" src="http://www.lightswitchtutorial.com/wp-content/uploads/2010/08/ScreenHunter_09-Aug.-26-19.03.gif" alt="LightSwitch Table or Database" width="625" height="124" /></li>
</ol>
<p>Before we proceed, note the structure of the LightSwitch project from the Solution Explorer in Visual Studio. There are three elements :</p>
<ul>
<li> Properties &#8211; which is main configuration settings for LightSwitch, such as whether the app will be deployed as as a browser app or a stand-alone desktop app.</li>
<li>Data Sources &#8211; the data tables being used to data storage by the LightSwitch app.</li>
<li>Screens &#8211; the front-end &#8216;screens&#8217; or pages which the end user will use to interact with the application.</li>
</ul>
<h3>Creating a Data Table in LightSwitch</h3>
<p>Continues&#8230;<br /> <br />
In this section of the tutorial we will create a table for storing the company&#8217;s customer data</p>
<ol>
<li>Click Create new Table from the screen shown above (alternatively you can right-click on Data Sources in the Solution Explorer and select Add Table).</li>
<li>Enter the details for each field in the table entry form. In this demo of a customers data tables I have used the fields FirstName, LastName, Email and PhoneNumber. Set the data type for each field, the default type is String, but note the types of EmailAddress and PhoneNumber which have inbuilt validation (as we will see in later tutorials) and should be used whenever possible for these fields. Save the fields by click Control+S or the save icon in the Visual Studio toolbar. For this tutorial I have set all fields to Required, but note that you will often want to uncheck this requirement for some fields to make their input option.<br />
<img class="alignnone size-full wp-image-19" title="LightSwitch 1" src="http://www.lightswitchtutorial.com/wp-content/uploads/2010/08/ScreenHunter_10-Aug.-26-19.25.gif" alt="LightSwitch Data Table Entry" width="492" height="243" /></li>
<li>Change the table name to <em>Customers </em> by right-clicking on the table (currently named <em>TableItem1</em>) under Data Sources &gt; ApplicationData , and then selecting Rename</li>
</ol>
<h3>Display Customer Data in an Editable Grid</h3>
<p>In this final part of the tutorial we will create a simple one screen grid which the user will be able to view, edit and add customers to the LightSwitch application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lightswitchtutorial.com/2010/08/lightswitch-tutorial-creating-a-basic-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

