- Introduction
- Creating a Sample Project
- Writing Code to Create Logs
- Testing the Application
Creating a Sample Project
Let's start by creating a new LightSwitch project. For this example, you'll create two simple entities:
- Contact. This entity represents the data that the application will manage.
- Log. This entity is used in the background to generate logs about the users' activities.
Figure 1 shows how the Contact entity must be defined.
Figure 1 Defining the Contact entity.
Figure 2 shows how to create the Log entity.
Figure 2 Defining the Log entity to store activity information.
Every time a user performs an activity that you want to monitor, a new instance of the Log entity will be created, storing the name of the user, the type of task being performed, a timestamp, and additional notes (optional).
Finally, add a data entry screen and a search screen, both to work with the Contact entity. Figure 3 shows the project at this point.
Figure 3 The sample project now includes screens.