Start working with LightSwitch in VS 2010

LightSwitch - Start up:

LightSwitch has been launched and I wondered why Microsoft are only offering a Trial Version well one only has to check out the features it offers to understand that developing Business Applications has never been this easy.

Honestly one does not need to be a developer to start building Buiness Application now. Thanks to LightSwitch.

Enough of Talking. Let me give some Demo now.

Step 1 :

Install LightSwitch Trial 2011 .This is a 90 days Trial Version. Download it from the path given below :

On running the small exe the Light Switch setup would start as shown below :

Download LightSwitch 2011

Download LightSwitch in 2011

Download LightSwitch in 2011

Developing a Simple Application using LightSwitch :

Lets create a new LightSwitch Project - C# and name it LightSwitchDemo.

Create LightSwitch Application

The LightSwitch designer opens up.

LightSwitch Designer

LightSwitch Designer

The Attach Data Source Wizard opens up. Lets select Database and hit Ok.

LightSwitch Data Source Wizardgif

Lets Setup the Connection.

setup the connection in LightSwitch 2011

Select the Tables and Hit Finish.

select table in lightswitch 2011

The Solution should now look as below :

solution of LightSwitch 2011

create solution in light switch 2011

add screen in LightSwitch 2011

The Add New Screen window opens up. Select any of the Screen Template. Lets say List and Details Template.

screen template in LightSwitch

add screen template in LightSwitch

Also Select the Screen Data. Let choose Article Table.

Table in LightSwitch 2011

Now we are set to give our application a first Build. Lets hit F6. Should Build Fine.

Lets hit a F5 to run our application. By Default it would run as a Desktop Application.

The application opens up.

Application open in  LightSwitch2011

Lets Check out the default design offered to us by LightSwitch.

default design in LightSwitch 2011

Lets check out one by one.

Menu :

menu in LightSwitch 2011

Add Button :

add button in LightSwitch

Clicking on the Add Button opens up a Add article Dialog Box for us.

dialog box in LightSwitch 2011

Simple add a new Article.

add new article in lightswitch

Lets hit Ok and see what happens. The new article is added to the List as shown below. That was not too difficult was it.

List detail in LightSwitch 2011

Edit Button :

edit button in LightSwitch 2011

Clicking on the Edit Button. Edit article dialog pops up. Just edit say the Body field and click ok.

edit article in LightSwitch 2011

The change gets Reflected.

artcle edit in LightSwitch2011

Delete Button :

delete button in LightSwitch 2011

delete option in LightSwitch 2011

The article gets marked for deletion as shown below.

List Deleted in LightSwitch 2011

Save or Discard the changes :

Did you notice the below Save and refresh Button :

You can easily save the changes made to the Database or discard them.

save changes in database LightSwitch 2011

Click on Save Button.

Save data in LightSwitch 2011

The article which was marked for deletion is deleted now.

Records in LightSwitch 2011

Export Option :

Export in LightSwitch 2011

Clicking on the Export Button the data gets exported to Excel.

Cool Search :

Does offer a really simple and cool search option.

Search option in LightSwitch 2011

The search pulls up the record and displays as shown below :

Searched record in LightSwitch 2011


In this article I have only given an introduction to what is Lightswitch. We have not really not seen the features that LightSwitch offers. I am planning to cover most of LightSwitch in my future articles. Till then Happy Coding or No Coding.