Azure App Service Helpers

Post on 13-Jan-2017

125 views 0 download

Transcript of Azure App Service Helpers

Shared C# codebase • 100% native API access • High performance

iOS C# UI Windows C# UIAndroid C# UI

Shared C# Mobile C# Server

Linux/Mono

CoreCLRAzure

Shared C# Client/Server

REST A

PI

Offline sync

Facebook Twitter Microsoft Google Azure Active Directory

Azure Mobile Apps

WindowsAndroidChrome

iOS OSX

In-AppKindle

Backend code

SQL MongoTables O365 API Apps

Offline Sync

Create a Mobile Service

MobileService = new MobileServiceClient(

"https://myapp.azurewebsites.net");

Create TablesIMobileServiceSyncTable<Store> table;

public async Task Init()

{

const string path = "syncstore.db";

var db = new MobileServiceSQLiteStore(path);

db.DefineTable<Store>();

}

var handler = new MobileServiceSyncHandler();

await MobileService.SyncContext.InitializeAsync(db, h);

table = MobileService.GetSyncTable<Store>();

Get and Modify Datapublic async Task<IEnumerable<Store>> GetStoresAsync()

{

await table.PullAsync("allStores", table.CreateQuery());

return await table.ToEnumerableAsync();

}

public async Task<Store> AddStoreAsync (Store store){

await table.InsertAsync (store);await table.PullAsync("allStores", table.CreateQuery());await MobileService.SyncContext.PushAsync();return store;

}

var new EasyMobileServiceClientKeys

Headline

github.com/MikeCodesDotNet/App-Service-Helpers

Thank you.

James

Montemagno

Principal Program Manager – Xamarin,

jamont@microsoft.com motzcod.es @JamesMontemagno

Questions?