Create a Project from Web API Client Template

  1. From Visual Studio with the Blackbaud Infinity SDK installed, select FileNewProject. The New Project screen appears.

  2. Select Visual BasicBlackbaud AppFxWeb API Client Template.

  3. Enter a name such as Blackbaud.CustomFx.Example.WebAPIClient and select a location for the project.

  4. Click OK. The project is created and it appears in Solution Explorer.

  5. Open Module1.vb.

    Note: The template includes stubbed-out code to demonstrate accessing the API with Blackbaud.AppFx.WebAPI.dll and a WebAPIClient DLL. WebAPIClient DLLs are discussed in Web API Client DLLs and Data Forms. But web service methods for AppFxWebService can be accessed with Blackbaud.AppFx.WebAPI.dll. The strongly typed helper classes in WebAPIClient DLLs are not a requirement.

  6. Three constants are declared for system settings. You can adjust these for the system the client will access or you can provide another method to provide these settings for the application. Instances of the AppFxWebServiceProvider class have properties for Url and Database that can be populated with these constants. This is shown in the stubbed-out code.

    Credentials must also be provided. There is commented code that demonstrates how to set the Credential property for the AppFxWebServiceProvider instance.

    The rest of the stubbed-out code demonstrates using a WebAPIClient DLL to load and save data for a data form. This is discussed in Web API Client DLLs and Data Forms. To load and save data with just Blackbaud.AppFx.WebAPI.dll, you can follow the steps in Call a Web Method from a Web API Client.