-
Notifications
You must be signed in to change notification settings - Fork 14
Tutorial 04 03 Add Traditional Bridge Library Code
Having added a Traditional Bridge project to your Harmony Core solution, the next step is to add the Traditional Bridge library code to the new project. This library code is a collection of pre-written helper code that is provided by Harmony Core to help you deal with JSON data, receive, parse, construct and send JSON-RPC messages, and more.
As you work through this tutorial you will be adding various types of code into the TraditionalBridge project, so it's a good idea to use folders to segregate the different types of code.
- In
Solution Explorer
, right-click on theTraditionalBridge
project, selectNew Folder
, and name the folderBridge
.
We're going to use the Harmony Core Upgrade Tool to provide the Traditional Bridge library code into our new project, but we need to give it a hint where we want it to put the code by creating a source file that it is coded to look for.
- Right-click on the new
Bridge
folder, selectAdd > Class...
, name the classRoutineDispatcher.dbl
, and click theAdd
button to add the new file.
Now you can use the project upgrade tool, which will do three things:
- Check all of your projects and make sure that you are using the latest released version of Harmony Core, and appropriate versions of all dependencies.
- Provide updated versions of all CodeGen templates.
- Add the Traditional Bridge library code into your new
Bridge
folder.
-
Use
Tools > Command Prompt (x64)
to open a command prompt window. -
Move up one level to your main solution directory.
cd ..
-
In Visual Studio, close the solution.
-
Execute the following command to run the update tool:
harmonycore upgrade-latest
You will be required to enter
YES
to confirm the upgrade, and you should see output similar to this:Scanning 'D:\HC_WEBINAR_MyDemoApi' for HarmonyCore project files This utility will make significant changes to projects and other source files in your Harmony Core development environment. Before running this tool we recommend checking the current state of your development environment into your source code repository, taking a backup copy of the environment if you don't use source code control. Type YES to proceed: YES Updating template files in D:\HC_WEBINAR_MyDemoApi\Templates Found template files in D:\HC_WEBINAR_MyDemoApi\Templates\SignalR Found template files in D:\HC_WEBINAR_MyDemoApi\Templates\TraditionalBridge Updating traditional bridge files in D:\HC_WEBINAR_MyDemoApi\TraditionalBridge\Bridge
If your solution was using an earlier version of Harmony Core then it will have been updated to the latest version, and the upgrade tool should have provided the latest version of the Traditional Bridge library code into your new Bridge
folder.
-
In Visual Studio, re-open the solution.
-
In
Solution Explorer
, right-click on theBridge
folder and selectAdd > Existing Item...
-
Drill into the
Bridge
folder and select all of the DBL files, then clickAdd
to add the files to the project. -
Right-click on the
TraditionalBridge
project and selectBuild
. -
Check the
Output
window and verify that the build was successful.1>------ Build started: Project: TraditionalBridge, Configuration: Debug x64 ------ ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Next topic: Add Traditional Bridge Routines
-
Tutorial 2: Building a Service from Scratch
- Creating a Basic Solution
- Enabling OData Support
- Configuring Self Hosting
- Entity Collection Endpoints
- API Documentation
- Single Entity Endpoints
- OData Query Support
- Alternate Key Endpoints
- Expanding Relations
- Postman Tests
- Supporting CRUD Operations
- Adding a Primary Key Factory
- Adding Create Endpoints
- Adding Upsert Endpoints
- Adding Patch Endpoints
- Adding Delete Endpoints
-
Harmony Core Code Generator
-
OData Aware Tools
-
Advanced Topics
- CLI Tool Customization
- Adapters
- API Versioning
- Authentication
- Authorization
- Collection Counts
- Customization File
- Custom Field Types
- Custom File Specs
- Custom Properties
- Customizing Generated Code
- Deploying to Linux
- Dynamic Call Protocol
- Environment Variables
- Field Security
- File I/O
- Improving AppSettings Processing
- Logging
- Optimistic Concurrency
- Multi-Tenancy
- Publishing in IIS
- Repeatable Unit Tests
- Stored Procedure Routing
- Suppressing OData Metadata
- Traditional Bridge
- Unit Testing
- EF Core Optimization
- Updating a Harmony Core Solution
- Updating to 3.1.90
- Creating a new Release
-
Background Information