LightSwitch ServerApplicationContext

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

The ServerApplicationContext API allows you to call custom business logic on the LightSwitch Server tier. Unlike accessing LightSwitch as an OData data source, the ServerApplicationContext API lets you accomplish tasks such as:

  • Start a workflow or process on the LightSwitch Server tier from a client application.

  • Retrieve non-entity data from the LightSwitch Server tier.

  • Upload a file to the Server tier from a client application and store it in a remote location

  • Create a standalone user interface (for example, an .aspx page) that reads and writes LightSwitch data.

The ServerApplicationContext can be called from within your own web service endpoints. You can add any of the normal ASP.NET web assets to your Server project and create new ways of interacting with the LightSwitch server. For example, you could create an ASP.NET Web Form, a WCF Service, or a Web API endpoint. You decide the appropriate way you'd like to expose a new service, using the normal Visual Studio gestures for adding and working with those assets.

See Also

Walkthrough: Inserting Data with the ServerApplicationContext
ServerApplicationContext API Reference
LightSwitch as a Data Source