Skip to content

Instantly share code, notes, and snippets.

@chrisriesgo
Created July 17, 2016 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisriesgo/34baa10484b9c0fcac8611216e07eab3 to your computer and use it in GitHub Desktop.
Save chrisriesgo/34baa10484b9c0fcac8611216e07eab3 to your computer and use it in GitHub Desktop.
public partial class App : Application
{
public App()
{
InitializeComponent();
// 1. Create a new EasyMobileServiceClient.
var client = EasyMobileServiceClient.Create();
// 2. Initialize the library with the URL of the Azure Mobile App you created in Step #1.
// Example: http://appservicehelpers.azurewebsites.net
client.Initialize(Constants.ApplicationURL);
// 3. Register a model with the EasyMobileServiceClient to create a table.
client.RegisterTable<TodoItem>();
// 4. Finalize the schema for our database. All table registrations must be done before this step.
client.FinalizeSchema();
// The root page of your application
MainPage = new TodoList(client);
}
protected override void OnStart()
{
// Handle when your app starts
}
protected override void OnSleep()
{
// Handle when your app sleeps
}
protected override void OnResume()
{
// Handle when your app resumes
}
}
using AppServiceHelpers;
using Xamarin.Forms;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment