public AzureDataService(string azureMobileAppURL) { // Create Client var mobileService = EasyMobileServiceClient.Create(); mobileService.Initialize(azureMobileAppURL); // Register the data model to create the table with mobileService.RegisterTable <Cache>(); mobileService.FinalizeSchema(); cacheTable = mobileService.Table <Cache>(); }
public App() { AzureClient = EasyMobileServiceClient.Create(); AzureClient.Initialize("https://montemagnospeakers.azurewebsites.net"); AzureClient.RegisterTable <Model.Speaker>(); AzureClient.FinalizeSchema(); // The root page of your application var content = new SpeakersPage(); MainPage = new NavigationPage(content); }
public CoffeesViewModel() { // 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. client.Initialize("https://motzcoffee.azurewebsites.net"); // 3. Register a model with the EasyMobileServiceClient to create a table. client.RegisterTable <Coffee>(); // 4. Finalize the schema for our database. All table registrations must be done before this step. client.FinalizeSchema(); table = client.Table <Coffee>(); }
public App() { InitializeComponent(); // 1. Create a new EasyMobileServiceClient. AzureClient = EasyMobileServiceClient.Create(); // 2. Initialize the library with the URL of the Azure Mobile App you created in Step #1. // Example: https://appservicehelpers.azurewebsites.net AzureClient.Initialize("https://ucl-1.azurewebsites.net"); // 3. Register a model with the EasyMobileServiceClient to create a table. AzureClient.RegisterTable <Model.Lecture>(); // 4. Finalize the schema for our database. All table registrations must be done before this step. AzureClient.FinalizeSchema(); var content = new LecturesPage(); MainPage = new NavigationPage(content); }
protected override void Load(ContainerBuilder builder) { // Register bot connector //builder.RegisterType<BotConnectorDirectLineAPIV30>() // .As<IBotConnectorDirectLineAPIV30>() // .WithParameter( // "credentials", // new TokenCredentials("")); // Register mobile service client var mobileServiceClient = (EasyMobileServiceClient)EasyMobileServiceClient.Create(); mobileServiceClient.Initialize(Constants.ApplicationURL); RegisterSchemaTables(mobileServiceClient); mobileServiceClient.FinalizeSchema(); builder.RegisterInstance(mobileServiceClient).As <IEasyMobileServiceClient>(); builder.RegisterInstance(mobileServiceClient.MobileService).As <IMobileServiceClient>(); // Register core services builder.RegisterType <TodoItemManager>().As <ITodoItemManager>();//.SingleInstance(); // Register view models builder.RegisterType <TodoListViewModel>().AsSelf(); }