Skip to content
Code Examples for using WebApiClientGen
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DemoAngular2
DemoWebApi.ClientApi
DemoWebApi.ClientApiShared
DemoWebApi.ClientApiStandard
DemoWebApi.DemoData
DemoWebApi
Mobile
Tests
.gitignore
CreateClientApi.ps1
Readme.md
StartDemoWebApi.ps1
StartNG2.ps1
UpgradeLog.htm
WebApiClientGenExamples.sln
license.md

Readme.md

Strongly Typed Client API Generators generate strongly typed client API in C# codes and TypeScript codes. This repository contains code examples explained in the following CodeProject.com articles:

And this repository contains 2 demo applications:

  1. DemoAngular2, an Angular 2+ applications based on the Heroes example in Angular's tutorial Website.
  2. Fonlow.Heroes.Android, a Xamarin.Forms application mimicking the Heroes example in Angular's tutorial Website.

Both applications consume the same Web API through the client API codes generated by WebApiClientGen.

Prerequisites

This VS solution was constructed using Visual Studio 2015-2017.

Server side:

  1. .NET Framework 4.6.2
  2. ASP.NET Web API 2.2

.NET client side:

  1. .NET Framework 4.6.2, or Universal Windows, or Xamarin.Android, or Xamarin.iOS
  2. ASP.NET Web API 2.2 Client Libraries
  3. Json.NET of Newtonsoft for Content-Type application/json
  4. Microsoft Build Tools 2015

TypeScript client side:

  1. TypeScript compiler 2.6
  2. Angular 2/4/5 and its dependencies in node_modules supported by Node.js and npm.

Remarks:

  • tag "withWebApiClientGen22" is with WebApiClientGen v2.2 and Angular 4.3
  • tag "NG522" is with WebapiClientGen v2.4.4 and Angular 5
  • Current trunk is similar to tag "NG522

Hints:

  • The Android mobile app is talking to the Web API, however the base URI http://192.168.0.2:9030/webapi/ is hard-coded in HeroesFunction. So you may need to alter the base URI in codes in order to run the app successfuly in either Android devices or emulators, after you have deployed the Web API to IIS.

Testing on Browsers and Mobile Devices

BrowserStack

Special thanks to the support of BrowserStack so real cross browser testing on multiple desktop and mobile platforms as well is possible. And App Live supports testing Android apps and iOS apps on rich collections of real Android and iOS devices.

You can’t perform that action at this time.