O'Reilly logo

Microsoft Visual Studio LightSwitch Business Application Development by Jayaram Krishnaswamy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing and testing code targeting the entity

In order to write code to target the entity you should be in the entity designer of the application. Here we will attach to an external database; bring in some entities to the IDE and write code.

Inserting default values in the entity

The code we write addresses the business requirement that certain columns need to be filled with default values while making a data entry and we want the code to provide the defaults.

  1. Create a MSLS VB Project (herein LS_Data2).
  2. Attach database Northwind on SQL Express 2008.

    Note

    Northwind database is available in several versions of MS Access and SQL Servers. Because of their widespread use Microsoft has made available these files in several locations as you have seen in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required