Getting Started
Tutorials > Getting StartedPrerequisites
Creating a new Vidyano Project
- Launch Microsoft Visual Studio and select File -> New -> Project from the main menu.
- In the Add New Project dialog, select Vidyano, choose the Vidyano Application template, and name it AdventureWorksDemo. Optionally select a different location. Click OK.

- In the New Project wizard dialog, type AdventureWorks Demo where it says Application Title. Leave all other settings as default. Click Finish.


Creating a LINQ to SQL Model on AdventureWorks
Let’s add a LINQ to SQL model to our model project, which we can use as data layer for our Vidyano modules later on.- In Visual Studio, right-click the AdventureWorksDemo.Model project.
- Select Add -> New Item.
- In the Add New Item dialog, select Data and choose the LINQ to SQL classes template.
- Enter AdventureWorks.dbml as filename and click Add.
- Right-click Data Connections and select Add Connection.
- Make sure the Data source says Microsoft SQL Server. If not, then click the Change button and select it from the list.
- Type .\SQLEXPRESS where it says Server name. Select Use Windows Authentication.
- Select the AdventureWorksLT2008 database from the list and click OK.

- Expand the new data connection, and its Tables node. Select all tables, except BuildVersion and ErrorLog, and drag them on the LINQ to SQL design surface.
Note: Visual Studio automatically adds a new app.config and Settings.settings file to your project. You may delete these from your project as we are going to enter our connection string in a different location. If you delete these files you also need to clear the connection property. To do this, click somewhere on the design surface of your LINQ to SQL file so that the properties panel shows all properties of the AdventureWorksDataContext. Set the Connection property to (None).
Create a Vidyano Module
- Right-click the AdventureWorksDemo.Modules project in your solution and choose Add -> Vidyano Module.
- Set the name to Customers.mod
- In the Add Module dialog you can select which Model will be used for this Module. Select the AdventureWorksDataContext model and click Finish.
Adding a page to the Vidyano Module
The Customers designer should now be visible in Visual Studio (if not, double-click the Customers.mod file in the project). We are going to add a page which will list all customers.- On the left side of the Module Designer, click Pages, then click the Add Page ... button. The Add New Page wizard will be launched.
- In the Add New Page dialog, enter Overview as the name for our new page. Leave all other settings as default. Click Next.
- Select the top-left layout (Empty) for this page, which is just a single part layout. Click Finish.
Binding the data
On the page designer, we can select what data needs to be shown. First select the Layout tab. There is only one part on this page (PART_1). Perform the following steps to make it show the list of Customers.- Click the button “1” in the center of PART_1.
- From the Add Part for PART_1 dialog, select the ListView (Grid) control.
- Select the Customer entity and choose the Module.Context.Customers binding. This will query the customers directly from the database.
- Select the following properties and add them to the list on the right-side by double-clicking the property or clicking the > button after having them selected: Title, FirstName, MiddleName, LastName and CompanyName. (Note: You can change the order by dragging the properties in the right-side list)
- Click Next.
Setting the connection string
- In the Solution Explorer, double-click the Application.app file in the AdventureWorksDemo project.
- Next to the ConnectionString, click the browse (...) button.
- From the Choose Data Source dialog, select Microsoft SQL Server.
- Type .\SQLEXPRESS where it says Server name. Select Use Windows Authentication.
- Select the AdventureWorksLT2008 database from the list and click OK.
Launching the application
- Run the application by pressing CTRL+F5 or the Play button on the toolbar.
- In the application, choose the Customers module from the top-left menu.

Tutorials
- Relational Data (Part 2)
- Page Navigation (Part 3)

