Download pdf - Azure App Service Helpers

Transcript
Page 1: Azure App Service Helpers
Page 2: Azure App Service Helpers
Page 3: 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

Page 4: Azure App Service Helpers

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

Page 5: Azure App Service Helpers

Create a Mobile Service

MobileService = new MobileServiceClient(

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

Page 6: Azure App Service Helpers

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>();

Page 7: Azure App Service Helpers

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;

}

Page 8: Azure App Service Helpers
Page 9: Azure App Service Helpers
Page 10: Azure App Service Helpers

var new EasyMobileServiceClientKeys

Headline

Page 11: Azure App Service Helpers
Page 12: Azure App Service Helpers

github.com/MikeCodesDotNet/App-Service-Helpers

Page 13: Azure App Service Helpers

Thank you.

James

Montemagno

Principal Program Manager – Xamarin,

[email protected] motzcod.es @JamesMontemagno

Questions?