<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Azure Mobile App &#8211; Sibeesh Passion</title>
	<atom:link href="https://sibeeshpassion.com/tag/azure-mobile-app/feed/" rel="self" type="application/rss+xml" />
	<link>https://sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Tue, 10 Jul 2018 10:29:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>Azure Mobile App &#8211; Sibeesh Passion</title>
	<link>https://sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Creating Azure Mobile App With Visual Studio</title>
		<link>https://sibeeshpassion.com/creating-azure-mobile-app-with-visual-studio/</link>
					<comments>https://sibeeshpassion.com/creating-azure-mobile-app-with-visual-studio/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sun, 24 Apr 2016 00:00:46 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Asp.Net]]></category>
		<category><![CDATA[Azure Mobile App]]></category>
		<category><![CDATA[Mobile App With Azure And Visual Studio]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 10]]></category>
		<guid isPermaLink="false">http://sibeecst_passion.com/?p=11507</guid>

					<description><![CDATA[[toc] Introduction In this article we are going to create a mobile application with Azure using Visual Studio. Before you start with make sure that you have some azure credits with you. You can always create new azure free account where you can claim for some free credits Azure free trial . Please be noted that you can get only limited azure credits with the free account. But to get started, that is more than enough. Now we will go and create our application. I hope you will like this. Download the source code You can always download the source [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[toc]</p>
<h3>Introduction</h3>
<p>In this article we are going to create a mobile application with <a href="http://sibeeshpassion.com/category/azure" target="_blank">Azure</a> using <a href="http://sibeeshpassion.com/category/visual-studio" target="_blank">Visual Studio</a>. Before you start with make sure that you have some azure credits with you. You can always create new azure free account where you can claim for some free credits <a href="https://azure.microsoft.com/en-in/pricing/free-trial/" target="_blank">Azure free trial </a>. Please be noted that you can get only limited azure credits with the free account. But to get started, that is more than enough. Now we will go and create our application. I hope you will like this. </p>
<h3>Download the source code</h3>
<p>You can always download the source code here</p>
<li><a href="https://gallery.technet.microsoft.com/Creating-Azure-Mobile-App-89d3df9f" target="_blank">Azure Mobile App With Visual Studio</a></li>
<h3>Background</h3>
<p>We all know what Azure is. If you are really new to Azure, I strongly recommend you to have a look at <a href="http://sibeeshpassion.com/category/azure" target="_blank">here</a> .To get started, please make sure that you have installed Visual Studio in your machine. You can always download visual studio from <a href="https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx" target="_blank">here</a>. </p>
<h3>Setting Azure Portal </h3>
<p>Login to your Azure portal from <a href="https://portal.azure.com/" target="_blank">Azure Portal</a>. Once you logged in, you can see a dashboard and a menu as follows.</p>
<div id="attachment_11508" style="width: 295px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Microsoft-Azure-Portal-Menu.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-11508" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Microsoft-Azure-Portal-Menu.png" alt="Microsoft Azure Portal Menu" width="285" height="747" class="size-full wp-image-11508" srcset="/wp-content/uploads/2016/04/Microsoft-Azure-Portal-Menu.png 285w, /wp-content/uploads/2016/04/Microsoft-Azure-Portal-Menu-114x300.png 114w, /wp-content/uploads/2016/04/Microsoft-Azure-Portal-Menu-229x600.png 229w" sizes="(max-width: 285px) 100vw, 285px" /></a><p id="caption-attachment-11508" class="wp-caption-text">Microsoft Azure Portal Menu</p></div>
<p>Now click on New -> Web+Mobile -> Mobile App.</p>
<div id="attachment_11509" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Web-Mobile-Category-In-Azure-Portal-e1460901278999.png"><img decoding="async" aria-describedby="caption-attachment-11509" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Web-Mobile-Category-In-Azure-Portal-1024x886.png" alt="Web Mobile Category In Azure Portal" width="634" height="549" class="size-large wp-image-11509" /></a><p id="caption-attachment-11509" class="wp-caption-text">Web Mobile Category In Azure Portal</p></div>
<p>Now name your mobile application. Select your subscription, it will be automatically selected if you have only one subscription. Please select the subscription accordingly if you have multiple subscriptions. Select or create new resource group. You may be thinking what is this resource group, and what are all the benefits for using it. According to Microsoft, a resource group is a collection of resources so that you can use those accordingly. A resource can be included only in one resource group and it is possible to link the resources in other resource group. Please be noted that you can&#8217;t edit and rename your resource group name. Only option you are allowed is to move your resources to your new resource group. Please see <a href="https://azure.microsoft.com/en-us/documentation/articles/resource-group-move-resources/" target="_blank">Move resources to a new resource group in azure</a> if you need to move your resources. </p>
<p>Now select your service plan or location as per your need. Now click on that link. You can see all the service plans you have used so far, you can select those if you want or you can create a new one. </p>
<div id="attachment_11511" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Available-App-Service-Plan-In-Azure-e1460903507474.png"><img decoding="async" aria-describedby="caption-attachment-11511" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Available-App-Service-Plan-In-Azure-e1460903507474.png" alt="Available App Service Plan In Azure" width="650" height="526" class="size-full wp-image-11511" srcset="/wp-content/uploads/2016/04/Available-App-Service-Plan-In-Azure-e1460903507474.png 650w, /wp-content/uploads/2016/04/Available-App-Service-Plan-In-Azure-e1460903507474-300x243.png 300w, /wp-content/uploads/2016/04/Available-App-Service-Plan-In-Azure-e1460903507474-400x324.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11511" class="wp-caption-text">Available App Service Plan In Azure</p></div>
<p>To create a new one, please click the &#8216;Create new&#8217; option. </p>
<div id="attachment_11512" style="width: 393px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/New-App-Service-Plan-In-Azure.png"><img decoding="async" aria-describedby="caption-attachment-11512" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/New-App-Service-Plan-In-Azure.png" alt="New App Service Plan In Azure" width="383" height="867" class="size-full wp-image-11512" srcset="/wp-content/uploads/2016/04/New-App-Service-Plan-In-Azure.png 383w, /wp-content/uploads/2016/04/New-App-Service-Plan-In-Azure-133x300.png 133w, /wp-content/uploads/2016/04/New-App-Service-Plan-In-Azure-265x600.png 265w" sizes="(max-width: 383px) 100vw, 383px" /></a><p id="caption-attachment-11512" class="wp-caption-text">New App Service Plan In Azure</p></div>
<p>Now select your app service plan, location, pricing tier. When you select the pricing tier, please be cautious because Azure charge you according to your use. Select it according your use. </p>
<div id="attachment_11513" style="width: 396px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/App-Service-Pricing-Tier.png"><img decoding="async" aria-describedby="caption-attachment-11513" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/App-Service-Pricing-Tier.png" alt="App Service Pricing Tier" width="386" height="865" class="size-full wp-image-11513" srcset="/wp-content/uploads/2016/04/App-Service-Pricing-Tier.png 386w, /wp-content/uploads/2016/04/App-Service-Pricing-Tier-134x300.png 134w, /wp-content/uploads/2016/04/App-Service-Pricing-Tier-268x600.png 268w" sizes="(max-width: 386px) 100vw, 386px" /></a><p id="caption-attachment-11513" class="wp-caption-text">App Service Pricing Tier</p></div>
<p>Now this is how you Mobile App service set up looks like. You can always pin your mobile app to your dashboard. </p>
<div id="attachment_11514" style="width: 396px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Mobie-App-Service.png"><img decoding="async" aria-describedby="caption-attachment-11514" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Mobie-App-Service.png" alt="Mobie App Service" width="386" height="864" class="size-full wp-image-11514" srcset="/wp-content/uploads/2016/04/Mobie-App-Service.png 386w, /wp-content/uploads/2016/04/Mobie-App-Service-134x300.png 134w, /wp-content/uploads/2016/04/Mobie-App-Service-268x600.png 268w" sizes="(max-width: 386px) 100vw, 386px" /></a><p id="caption-attachment-11514" class="wp-caption-text">Mobie App Service</p></div>
<p>Once this is done, you will get a notification that your mobile app deployment is succeeded if nothing goes wrong and you can see the app in your dashboard. Now click on the settings of your mobile application and then quick start.</p>
<div id="attachment_11515" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Quick-Start-Option-In-Azure-Mobile-App-e1460905361428.png"><img decoding="async" aria-describedby="caption-attachment-11515" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Quick-Start-Option-In-Azure-Mobile-App-e1460905361428.png" alt="Quick Start Option In Azure Mobile App" width="650" height="581" class="size-full wp-image-11515" srcset="/wp-content/uploads/2016/04/Quick-Start-Option-In-Azure-Mobile-App-e1460905361428.png 399w, /wp-content/uploads/2016/04/Quick-Start-Option-In-Azure-Mobile-App-e1460905361428-300x268.png 300w, /wp-content/uploads/2016/04/Quick-Start-Option-In-Azure-Mobile-App-e1460905361428-400x358.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11515" class="wp-caption-text">Quick Start Option In Azure Mobile App</p></div>
<p>Select Windows(C#) from it. Now you will be asked to complete three actions. </p>
<li>Connect a database</li>
<li>Create a table API</li>
<li>Configure your client application</li>
<h3>Connect a database</h3>
<p>Click on connect a database ( We will create a database first). Click Add and add a data connection as follows. </p>
<div id="attachment_11516" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Data-Connections-In-Azure-Mobile-App-e1460905798522.png"><img decoding="async" aria-describedby="caption-attachment-11516" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Data-Connections-In-Azure-Mobile-App-1024x583.png" alt="Data Connections In Azure Mobile App" width="634" height="361" class="size-large wp-image-11516" /></a><p id="caption-attachment-11516" class="wp-caption-text">Data Connections In Azure Mobile App</p></div>
<p>Now give your database name and pricing tier. For now I am going to select the pricing tier as Basic. You can see 5 DTUs are available for Basic tier. According to Microsoft, The Database Transaction Unit (DTU) is the unit of measure in SQL Database that represents the relative power of databases based on a real-world measure: the database transaction. Please read more <a href="https://azure.microsoft.com/en-us/documentation/articles/sql-database-service-tiers/?rnd=1#understanding-dtus" target="_blank">here</a>.</p>
<p>Did you notice that there is a field called Collation? Basically a collation is a set of rules and regulation we set for the proper use of characters. Like the characters are much different in all the languages, we set the collation accordingly. The default collation for character data in Azure SQL database is <em>SQL_Latin1_General_CP1_CI_AS</em>. You can read about collation <a href="https://azure.microsoft.com/en-in/blog/working-with-collations-in-sql-azure/" target="_blank">here</a>. </p>
<p>Next, set your server and click OK. Once you click OK, you can see the connection strings is being set automatically for you. Creation of data connection may take few minutes. Now we will create a table API. </p>
<h3>Create a table API</h3>
<p>To store the data in your back end. You need a table, isn&#8217;t it? The first option you will see here is select the language for your back end actions. You can select either C# or Node JS. </p>
<blockquote><p>There was a time, that we can do server side actions only by using server side languages like C#,Vb.Net, PhP etc. Now everything changes, we can do server side actions with few set of JavaScript, that is Node JS. </p></blockquote>
<p>Once you select your language you can see a message as &#8220;Once you’ve downloaded your personalized server project, extract it and open in Visual Studio. Right-click the project and select “Publish” to host the code in your mobile backend. The TodoItem table will be created automatically using Entity Framework.&#8221; Now we will do as suggested. </p>
<p>Please open your downloaded project in Visual Studio. Right click the project file then click publish. You can see a window and finish Profile, Connection, Settings steps. </p>
<div id="attachment_11517" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Azure-Mobile-App-preview-e1460909105653.png"><img decoding="async" aria-describedby="caption-attachment-11517" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Azure-Mobile-App-preview-e1460909105653.png" alt="Azure Mobile App preview" width="650" height="519" class="size-full wp-image-11517" srcset="/wp-content/uploads/2016/04/Azure-Mobile-App-preview-e1460909105653.png 447w, /wp-content/uploads/2016/04/Azure-Mobile-App-preview-e1460909105653-300x240.png 300w, /wp-content/uploads/2016/04/Azure-Mobile-App-preview-e1460909105653-400x319.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11517" class="wp-caption-text">Azure Mobile App preview</p></div>
<p>Click publish once you verified the settings. It may take few minutes according to your internet bandwidth. In the meanwhile you can see all the controllers and additional files had been created for us automatically. For example below is the Values controller.</p>
<p>[csharp]<br />
using System.Web.Http;<br />
using System.Web.Http.Tracing;<br />
using Microsoft.Azure.Mobile.Server;<br />
using Microsoft.Azure.Mobile.Server.Config;</p>
<p>namespace SibeeshTasksService.Controllers<br />
{<br />
    // Use the MobileAppController attribute for each ApiController you want to use<br />
    // from your mobile clients<br />
    [MobileAppController]<br />
    public class ValuesController : ApiController<br />
    {<br />
        // GET api/values<br />
        public string Get()<br />
        {<br />
            MobileAppSettingsDictionary settings = this.Configuration.GetMobileAppSettingsProvider().GetMobileAppSettings();<br />
            ITraceWriter traceWriter = this.Configuration.Services.GetTraceWriter();</p>
<p>            string host = settings.HostName ?? &quot;localhost&quot;;<br />
            string greeting = &quot;Hello from &quot; + host;</p>
<p>            traceWriter.Info(greeting);<br />
            return greeting;<br />
        }</p>
<p>        // POST api/values<br />
        public string Post()<br />
        {<br />
            return &quot;Hello World!&quot;;<br />
        }<br />
    }<br />
}<br />
[/csharp]</p>
<p>Now the publish process is completed, you can see a message as follows. </p>
<div id="attachment_11518" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Azure-App-Service-Publish-e1460910331127.png"><img decoding="async" aria-describedby="caption-attachment-11518" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Azure-App-Service-Publish-1024x414.png" alt="Azure App Service Publish" width="634" height="256" class="size-large wp-image-11518" /></a><p id="caption-attachment-11518" class="wp-caption-text">Azure App Service Publish</p></div>
<p>Now please go back to your Azure portal. </p>
<h3>Configure your client application</h3>
<p>It is time to configure our client application now. Download the client application by clicking the link provided. And open the project in Visual Studio. Please install the missing files if it is asked to do so. </p>
<div id="attachment_11520" style="width: 585px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/MIssing-Componenets.png"><img decoding="async" aria-describedby="caption-attachment-11520" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/MIssing-Componenets.png" alt="MIssing Componenets" width="575" height="807" class="size-full wp-image-11520" srcset="/wp-content/uploads/2016/04/MIssing-Componenets.png 575w, /wp-content/uploads/2016/04/MIssing-Componenets-214x300.png 214w, /wp-content/uploads/2016/04/MIssing-Componenets-400x561.png 400w, /wp-content/uploads/2016/04/MIssing-Componenets-428x600.png 428w" sizes="(max-width: 575px) 100vw, 575px" /></a><p id="caption-attachment-11520" class="wp-caption-text">MIssing Componenets</p></div>
<p>Once the installation is done, reload your project and it will be asked to enable developer mode for windows 10. Go ahead and change that in settings. </p>
<p>Now please open the shared project and click on MainPage.cs file, you can see the CRUD operation actions are already created for us. </p>
<p>[csharp]<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Text;<br />
using System.Threading.Tasks;<br />
using Microsoft.WindowsAzure.MobileServices;<br />
using Windows.UI.Popups;<br />
using Windows.UI.Xaml;<br />
using Windows.UI.Xaml.Controls;<br />
using Windows.UI.Xaml.Navigation;</p>
<p>// To add offline sync support, add the NuGet package Microsoft.WindowsAzure.MobileServices.SQLiteStore<br />
// to your project. Then, uncomment the lines marked // offline sync<br />
// For more information, see: http://aka.ms/addofflinesync<br />
//using Microsoft.WindowsAzure.MobileServices.SQLiteStore;  // offline sync<br />
//using Microsoft.WindowsAzure.MobileServices.Sync;         // offline sync</p>
<p>namespace SibeeshTasks<br />
{<br />
    sealed partial class MainPage: Page<br />
    {<br />
        private MobileServiceCollection&lt;TodoItem, TodoItem&gt; items;<br />
        private IMobileServiceTable&lt;TodoItem&gt; todoTable = App.MobileService.GetTable&lt;TodoItem&gt;();<br />
        //private IMobileServiceSyncTable&lt;TodoItem&gt; todoTable = App.MobileService.GetSyncTable&lt;TodoItem&gt;(); // offline sync</p>
<p>        public MainPage()<br />
        {<br />
            this.InitializeComponent();<br />
        }</p>
<p>        private async Task InsertTodoItem(TodoItem todoItem)<br />
        {<br />
            // This code inserts a new TodoItem into the database. When the operation completes<br />
            // and Mobile App backend has assigned an Id, the item is added to the CollectionView.<br />
            await todoTable.InsertAsync(todoItem);<br />
            items.Add(todoItem);</p>
<p>            //await SyncAsync(); // offline sync<br />
        }</p>
<p>        private async Task RefreshTodoItems()<br />
        {<br />
            MobileServiceInvalidOperationException exception = null;<br />
            try<br />
            {<br />
                // This code refreshes the entries in the list view by querying the TodoItems table.<br />
                // The query excludes completed TodoItems.<br />
                items = await todoTable<br />
                    .Where(todoItem =&gt; todoItem.Complete == false)<br />
                    .ToCollectionAsync();<br />
            }<br />
            catch (MobileServiceInvalidOperationException e)<br />
            {<br />
                exception = e;<br />
            }</p>
<p>            if (exception != null)<br />
            {<br />
                await new MessageDialog(exception.Message, &quot;Error loading items&quot;).ShowAsync();<br />
            }<br />
            else<br />
            {<br />
                ListItems.ItemsSource = items;<br />
                this.ButtonSave.IsEnabled = true;<br />
            }<br />
        }</p>
<p>        private async Task UpdateCheckedTodoItem(TodoItem item)<br />
        {<br />
            // This code takes a freshly completed TodoItem and updates the database. When the service<br />
            // responds, the item is removed from the list.<br />
            await todoTable.UpdateAsync(item);<br />
            items.Remove(item);<br />
            ListItems.Focus(Windows.UI.Xaml.FocusState.Unfocused);</p>
<p>            //await SyncAsync(); // offline sync<br />
        }</p>
<p>        private async void ButtonRefresh_Click(object sender, RoutedEventArgs e)<br />
        {<br />
            ButtonRefresh.IsEnabled = false;</p>
<p>            //await SyncAsync(); // offline sync<br />
            await RefreshTodoItems();</p>
<p>            ButtonRefresh.IsEnabled = true;<br />
        }</p>
<p>        private async void ButtonSave_Click(object sender, RoutedEventArgs e)<br />
        {<br />
            var todoItem = new TodoItem { Text = TextInput.Text };<br />
            await InsertTodoItem(todoItem);<br />
        }</p>
<p>        private async void CheckBoxComplete_Checked(object sender, RoutedEventArgs e)<br />
        {<br />
            CheckBox cb = (CheckBox)sender;<br />
            TodoItem item = cb.DataContext as TodoItem;<br />
            await UpdateCheckedTodoItem(item);<br />
        }</p>
<p>        protected override async void OnNavigatedTo(NavigationEventArgs e)<br />
        {<br />
            //await InitLocalStoreAsync(); // offline sync<br />
            await RefreshTodoItems();<br />
        }</p>
<p>        #region Offline sync</p>
<p>        //private async Task InitLocalStoreAsync()<br />
        //{<br />
        //    if (!App.MobileService.SyncContext.IsInitialized)<br />
        //    {<br />
        //        var store = new MobileServiceSQLiteStore(&quot;localstore.db&quot;);<br />
        //        store.DefineTable&lt;TodoItem&gt;();<br />
        //        await App.MobileService.SyncContext.InitializeAsync(store);<br />
        //    }<br />
        //<br />
        //    await SyncAsync();<br />
        //}</p>
<p>        //private async Task SyncAsync()<br />
        //{<br />
        //    await App.MobileService.SyncContext.PushAsync();<br />
        //    await todoTable.PullAsync(&quot;todoItems&quot;, todoTable.CreateQuery());<br />
        //}</p>
<p>        #endregion<br />
    }<br />
}<br />
[/csharp]</p>
<p>And following is the XAML file created for our app design.</p>
<p>[xml]<br />
&lt;Page<br />
    x:Class=&quot;SibeeshTasks.MainPage&quot;<br />
    IsTabStop=&quot;false&quot;<br />
    xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;<br />
    xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;<br />
    xmlns:local=&quot;using:SibeeshTasks&quot;<br />
    xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;<br />
    xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;<br />
    mc:Ignorable=&quot;d&quot;&gt;</p>
<p>    &lt;Grid Background=&quot;White&quot;&gt;</p>
<p>        &lt;Grid Margin=&quot;50,50,10,10&quot;&gt;<br />
            &lt;Grid.ColumnDefinitions&gt;<br />
                &lt;ColumnDefinition Width=&quot;*&quot; /&gt;<br />
                &lt;ColumnDefinition Width=&quot;*&quot; /&gt;<br />
            &lt;/Grid.ColumnDefinitions&gt;<br />
            &lt;Grid.RowDefinitions&gt;<br />
                &lt;RowDefinition Height=&quot;Auto&quot; /&gt;<br />
                &lt;RowDefinition Height=&quot;*&quot; /&gt;<br />
            &lt;/Grid.RowDefinitions&gt;</p>
<p>            &lt;Grid Grid.Row=&quot;0&quot; Grid.ColumnSpan=&quot;2&quot; Margin=&quot;0,0,0,20&quot;&gt;<br />
                &lt;StackPanel&gt;<br />
                    &lt;TextBlock Foreground=&quot;#0094ff&quot; FontFamily=&quot;Segoe UI Light&quot; Margin=&quot;0,0,0,6&quot;&gt;MICROSOFT AZURE MOBILE SERVICES&lt;/TextBlock&gt;<br />
                    &lt;TextBlock Foreground=&quot;Gray&quot; FontFamily=&quot;Segoe UI Light&quot; FontSize=&quot;45&quot; &gt;SibeeshTasks&lt;/TextBlock&gt;<br />
                &lt;/StackPanel&gt;<br />
            &lt;/Grid&gt;</p>
<p>            &lt;Grid Grid.Row=&quot;1&quot;&gt;<br />
                &lt;StackPanel&gt;</p>
<p>                    &lt;local:QuickStartTask Number=&quot;1&quot; Title=&quot;Insert a TodoItem&quot; Description=&quot;Enter some text below and click Save to insert a new todo item into your database&quot; /&gt;</p>
<p>                    &lt;StackPanel Orientation=&quot;Horizontal&quot; Margin=&quot;72,0,0,0&quot;&gt;<br />
                        &lt;TextBox Name=&quot;TextInput&quot; Margin=&quot;5&quot; MinWidth=&quot;300&quot;&gt;&lt;/TextBox&gt;<br />
                        &lt;Button Name=&quot;ButtonSave&quot; Click=&quot;ButtonSave_Click&quot; IsEnabled=&quot;False&quot;&gt;Save&lt;/Button&gt;<br />
                    &lt;/StackPanel&gt;</p>
<p>                &lt;/StackPanel&gt;<br />
            &lt;/Grid&gt;</p>
<p>            &lt;Grid Grid.Row=&quot;1&quot; Grid.Column=&quot;1&quot;&gt;<br />
                &lt;Grid.RowDefinitions&gt;<br />
                    &lt;RowDefinition Height=&quot;Auto&quot; /&gt;<br />
                    &lt;RowDefinition /&gt;<br />
                &lt;/Grid.RowDefinitions&gt;<br />
                &lt;StackPanel&gt;<br />
                    &lt;local:QuickStartTask Number=&quot;2&quot; Title=&quot;Query and Update Data&quot; Description=&quot;Click refresh below to load the unfinished TodoItems from your database. Use the checkbox to complete and update your TodoItems&quot; /&gt;<br />
                    &lt;Button Margin=&quot;72,0,0,0&quot; Name=&quot;ButtonRefresh&quot; Click=&quot;ButtonRefresh_Click&quot;&gt;Refresh&lt;/Button&gt;<br />
                &lt;/StackPanel&gt;</p>
<p>                &lt;ListView Name=&quot;ListItems&quot; Margin=&quot;62,10,0,0&quot; Grid.Row=&quot;1&quot;&gt;<br />
                    &lt;ListView.ItemTemplate&gt;<br />
                        &lt;DataTemplate&gt;<br />
                            &lt;StackPanel Orientation=&quot;Horizontal&quot;&gt;<br />
                                &lt;CheckBox Name=&quot;CheckBoxComplete&quot; IsChecked=&quot;{Binding Complete, Mode=TwoWay}&quot; Checked=&quot;CheckBoxComplete_Checked&quot; Content=&quot;{Binding Text}&quot; Margin=&quot;10,5&quot; VerticalAlignment=&quot;Center&quot;/&gt;<br />
                            &lt;/StackPanel&gt;<br />
                        &lt;/DataTemplate&gt;<br />
                    &lt;/ListView.ItemTemplate&gt;<br />
                &lt;/ListView&gt;</p>
<p>            &lt;/Grid&gt;</p>
<p>        &lt;/Grid&gt;<br />
    &lt;/Grid&gt;<br />
&lt;/Page&gt;<br />
[/xml]</p>
<p>Now please run your project. Here I am running the app in visual studio. You can always run the same in Windows Emulator. If nothing goes wrong you can see an output as follows. </p>
<div id="attachment_11521" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Azure-Mobile-App-Output-e1460915717240.png"><img decoding="async" aria-describedby="caption-attachment-11521" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Azure-Mobile-App-Output-1024x800.png" alt="Azure Mobile App Output" width="634" height="495" class="size-large wp-image-11521" /></a><p id="caption-attachment-11521" class="wp-caption-text">Azure Mobile App Output</p></div>
<div id="attachment_11522" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Azure-Mobile-App-Output-Inserting-And-Reading-e1460915910597.png"><img decoding="async" aria-describedby="caption-attachment-11522" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Azure-Mobile-App-Output-Inserting-And-Reading-1024x802.png" alt="Azure Mobile App Output Inserting And Reading" width="634" height="497" class="size-large wp-image-11522" /></a><p id="caption-attachment-11522" class="wp-caption-text">Azure Mobile App Output Inserting And Reading</p></div>
<p>Just to make sure that the entries has been inserted and the data is getting from the database we can go back to our Azure portal. We all are humans, we believe things when we see. We all asks for the proof. Isn&#8217;t it? Click on SQL databases from the menu. Now you can see all the databases you have created, click on the database and get the server name, user id and password form the connection string. Once you get it, open your SQL Server Management Studio in your local machine and provide the details you took from the connection string. Now you can see the our Azure SQL database in your local SSMS.</p>
<div id="attachment_11523" style="width: 429px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Connect-Azure-SQL-Database-Through-SSMS.png"><img decoding="async" aria-describedby="caption-attachment-11523" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Connect-Azure-SQL-Database-Through-SSMS.png" alt="Connect Azure SQL Database Through SSMS" width="419" height="916" class="size-full wp-image-11523" srcset="/wp-content/uploads/2016/04/Connect-Azure-SQL-Database-Through-SSMS.png 419w, /wp-content/uploads/2016/04/Connect-Azure-SQL-Database-Through-SSMS-137x300.png 137w, /wp-content/uploads/2016/04/Connect-Azure-SQL-Database-Through-SSMS-400x874.png 400w, /wp-content/uploads/2016/04/Connect-Azure-SQL-Database-Through-SSMS-274x600.png 274w" sizes="(max-width: 419px) 100vw, 419px" /></a><p id="caption-attachment-11523" class="wp-caption-text">Connect Azure SQL Database Through SSMS</p></div>
<p>Now we can query our table and see the data. Right?</p>
<p>[sql]<br />
USE [Tasks]<br />
GO</p>
<p>SELECT [Id]<br />
      ,[Text]<br />
      ,[Complete]<br />
      ,[Version]<br />
      ,[CreatedAt]<br />
      ,[UpdatedAt]<br />
      ,[Deleted]<br />
  FROM [dbo].[TodoItems]<br />
GO<br />
[/sql]</p>
<p>I am sure you will get an result as follows.</p>
<div id="attachment_11524" style="width: 644px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Querying-Azure-SQL-Database-In-SSMS-e1460917590108.png"><img decoding="async" aria-describedby="caption-attachment-11524" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Querying-Azure-SQL-Database-In-SSMS-1024x435.png" alt="Querying Azure SQL Database In SSMS" width="634" height="269" class="size-large wp-image-11524" /></a><p id="caption-attachment-11524" class="wp-caption-text">Querying Azure SQL Database In SSMS</p></div>
<p>You can always run this same application in Windows Emulator, Now we will see how we can do that.</p>
<h3>Download Windows Emulator</h3>
<p>Before getting started, you must install Windows Emulator in your machine. You can get the Windows 10 emulator from <a href="https://www.microsoft.com/en-in/download/details.aspx?id=46893" target="_blank">here</a>. Please be noted that there are some sysytem requirements and actions to be taken care of before going to install the emulator. Basically Microsoft emulator works as a virtual machine on Hyper V. You must enable it. </p>
<h3>Enable Hyper-V in Windows</h3>
<p>To enable Hyper-V, go to control panel and select Programs, then click on &#8216;Turn windows feature on or off&#8217; and then select all the items under Hyper-V.</p>
<div id="attachment_11539" style="width: 564px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Enable-Hyper-V-in-Windows.png"><img decoding="async" aria-describedby="caption-attachment-11539" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Enable-Hyper-V-in-Windows.png" alt="Enable Hyper V in Windows" width="554" height="491" class="size-full wp-image-11539" srcset="/wp-content/uploads/2016/04/Enable-Hyper-V-in-Windows.png 554w, /wp-content/uploads/2016/04/Enable-Hyper-V-in-Windows-300x266.png 300w, /wp-content/uploads/2016/04/Enable-Hyper-V-in-Windows-400x355.png 400w" sizes="(max-width: 554px) 100vw, 554px" /></a><p id="caption-attachment-11539" class="wp-caption-text">Enable Hyper V in Windows</p></div>
<p>You may need to restart your system once. There are some additional requirements too.</p>
<h3>System Requirements</h3>
<p>We must enable the following configurations in BIOS.</p>
<li>Hardware-assisted virtualization</li>
<li>Second Level Address Translation (SLAT)</li>
<li>Hardware-based Data Execution Prevention (DEP)</li>
<p>And we need,</p>
<li>4GB or more RAM</li>
<li>OS Windows 8 or higher(Pro edition or higher)</li>
<p>To go to BIOS settings in Windows 10, Just type &#8216;change advanced startup options&#8217; in the start search box. And then click on the Restart under advanced settings. There you will see the BIOS options. Once you are done these procedures, you can go ahead and install Windows Emulator. After you install the emulator you can see an option to run the app in emulator in Visual Studio. </p>
<h3>Run app in Windows emulator</h3>
<p>Please see the option as follows in visual studio. </p>
<div id="attachment_11540" style="width: 660px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Emulator-option-in-Visual-studio-e1461419933506.png"><img decoding="async" aria-describedby="caption-attachment-11540" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Emulator-option-in-Visual-studio-e1461419933506.png" alt="Emulator option in Visual studio" width="650" height="82" class="size-full wp-image-11540" srcset="/wp-content/uploads/2016/04/Emulator-option-in-Visual-studio-e1461419933506.png 650w, /wp-content/uploads/2016/04/Emulator-option-in-Visual-studio-e1461419933506-300x38.png 300w, /wp-content/uploads/2016/04/Emulator-option-in-Visual-studio-e1461419933506-400x50.png 400w" sizes="(max-width: 650px) 100vw, 650px" /></a><p id="caption-attachment-11540" class="wp-caption-text">Emulator option in Visual studio</p></div>
<p>Now you can run your application in emulator if everything works fine. </p>
<div id="attachment_11541" style="width: 443px" class="wp-caption alignnone"><a href="http://sibeeshpassion.com/wp-content/uploads/2016/04/Windows-emulator-output.png"><img decoding="async" aria-describedby="caption-attachment-11541" src="http://sibeeshpassion.com/wp-content/uploads/2016/04/Windows-emulator-output.png" alt="Windows emulator output" width="433" height="839" class="size-full wp-image-11541" srcset="/wp-content/uploads/2016/04/Windows-emulator-output.png 184w, /wp-content/uploads/2016/04/Windows-emulator-output-155x300.png 155w, /wp-content/uploads/2016/04/Windows-emulator-output-400x775.png 400w, /wp-content/uploads/2016/04/Windows-emulator-output-310x600.png 310w" sizes="(max-width: 433px) 100vw, 433px" /></a><p id="caption-attachment-11541" class="wp-caption-text">Windows emulator output</p></div>
<p>I guess we are done. Hope you enjoyed reading. I will see you soon with another article. </p>
<h3>Conclusion</h3>
<p>Did I miss anything that you may think which is needed? Did you try Azure yet? Have you ever created any mobile apps? Could you find this post as useful? I hope you liked this article. Please share me your valuable suggestions and feedback.</p>
<h3>Your turn. What do you think?</h3>
<p>A blog isn&#8217;t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, Asp.Net Forum instead of commenting here. Tweet or email me a link to your question there and I’ll definitely try to help if I can.</p>
<p>Kindest Regards<br />
Sibeesh Venu</p>
]]></content:encoded>
					
					<wfw:commentRss>https://sibeeshpassion.com/creating-azure-mobile-app-with-visual-studio/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
