SlideShare une entreprise Scribd logo
Boot Camp
Présentation
d’Azure Mobile Services
Création d'une application simple de gestion
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
• Création d'un service et d'une base de données
• Utiliser l'api Azure Mobile Services pour les accès aux bases
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
Prêt en quelques minutes
manage.windowsazure.com
Création du service web
Création du service web
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
Création du service web
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
ou .Net (Preview)
ou créer une nouvelle DB
Création du service web
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
Conception de la base de données
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
Présentation de l’API
Microsoft.WindowsAzure.MobileServices (namespace)
{
• MobileServiceClient : accès au service mobile
• IMobileTable<T> : accès à une table
}
Client .Net :
Nuget (console) :
PM> Install-Package WindowsAzure.MobileServices
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
Utilisation de l’API
• Récupérer une référence sur la table Worker :
IMobileServiceTable<Worker> workerTable = client.GetTable<Worker>();
• Récupérer une référence vers le service :
MobileServiceClient client = new MobileServiceClient(’’service url’’, ‘’app key’’);
• Récupérer les workers :
List<Worker> productiveWorkers = await workerTable
.Where(worker => worker.productivity > 3)
.ToListAsync();
Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
Utilisation de l’API
• Récupérer une référence sur la table Worker :
IMobileServiceTable<Worker> workerTable = client.GetTable<Worker>();
• Récupérer une référence vers le service :
MobileServiceClient client = new MobileServiceClient(’’service url’’, ‘’app key’’);
• Récupérer les workers :
List<Worker> productiveWorkers = await workerTable
.Where(worker => worker.productivity > 3)
.ToListAsync();

Contenu connexe

Global Windows Azure Bootcamp : Pierre-Yves Fare Mobile Services. (sponsor Annuel du MUG-Lyon: Viseo)

  • 2. Création d'une application simple de gestion Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014 • Création d'un service et d'une base de données • Utiliser l'api Azure Mobile Services pour les accès aux bases
  • 3. Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014 Prêt en quelques minutes manage.windowsazure.com Création du service web
  • 4. Création du service web Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
  • 5. Création du service web Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014 ou .Net (Preview) ou créer une nouvelle DB
  • 6. Création du service web Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014
  • 7. Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014 Conception de la base de données
  • 8. Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014 Présentation de l’API Microsoft.WindowsAzure.MobileServices (namespace) { • MobileServiceClient : accès au service mobile • IMobileTable<T> : accès à une table } Client .Net : Nuget (console) : PM> Install-Package WindowsAzure.MobileServices
  • 9. Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014 Utilisation de l’API • Récupérer une référence sur la table Worker : IMobileServiceTable<Worker> workerTable = client.GetTable<Worker>(); • Récupérer une référence vers le service : MobileServiceClient client = new MobileServiceClient(’’service url’’, ‘’app key’’); • Récupérer les workers : List<Worker> productiveWorkers = await workerTable .Where(worker => worker.productivity > 3) .ToListAsync();
  • 10. Boot Camp - Présentation « Mobile Services » - FARE Pierre-Yves 29/03/2014 Utilisation de l’API • Récupérer une référence sur la table Worker : IMobileServiceTable<Worker> workerTable = client.GetTable<Worker>(); • Récupérer une référence vers le service : MobileServiceClient client = new MobileServiceClient(’’service url’’, ‘’app key’’); • Récupérer les workers : List<Worker> productiveWorkers = await workerTable .Where(worker => worker.productivity > 3) .ToListAsync();