Introduction
Microsoft Visual Studio LightSwitch 2012 is a new streamlined development environment for designing data-centric business applications and helps you to build data-centric applications quickly, through visual means.
LightSwitch business applications are multi-tiered, featuring a client application and a combination of LINQ, WCF RIA Services and the Entity Framework to implement the application services tier.
Benefits of using LightSwitch?
There are many benefits of using LightSwitch as shown in the following list:
- You can create an application with just a few clicks and no code or coding only in the data models or substantial code within all parts of the application.
- Based on permission, LightSwitch supports distinct audiences of end-users (View & Edit Data), administrative (maintain certain master data) and Super-users (granted access to most or all of the data and functionality) .
- Support for built-in Business Types are included (like Email, PhoneNumber, money,..etc), and partners can create new Business Types.
- Enable Debug mode, and allows the screen to be edited interactively while the application is running.
- Enable adding custom business rules to any field in the screen.
- You can create custom controls and embed sophisticated behaviors there.
- LightSwitch produces desktop applications or pulls down and executed implicitly by navigating to a URL.
- Enables you to deploy your LightSwitch on Cloud and Azure as simple as running a wizard.
Start building the App
Now let's start building our application, I am going to list everything in details starting from opening Visual Studio 2012 until running the application. We will go throw the following steps.
Step 1 : Creating the Application
Creating new LightSwitch application is very simple , if you're familiar with any old version of Visual Studio as follows:
Open VS 2012 -> New project -> Select LightSwitch from project Template list -> Select LightSwitch application (C#),
and finally we will write the project name LighSwitchsubscriptionApp -> press Ok
Step 2 : Creating & Defining Data tables and relationships
The first thing to do for a LightSwitch application is to create a Data Table and you can do this in one of four ways:
- Click the Create new table link in the start up project page "Start with data" which is called [your project name] Designer
- Go to the Visual Studio menu bar Select Project -> Add table
- Right-click Project Name in the Solution Explorer then select Add table
- Connect to an existing data source (published on a Database, SharePoint, OData Services or WCF RIA Service) as mentioned in step 2 and 3, but select Add data source instead of the Add Table option.




Comments
Join the conversation! Your thoughts help the community grow.