What is the best possible way to connect your windows phone 8 application with the database?Which is the best option? I want to make synchronization possible to that app database and azure SQL database.So the ultimate goal is to update the azure database and view the output on phone app even while it is offline. Provide appropriate links & tutorial wherever possible.
Build an ASP.NET MVC WebAPI server, hosted as an Azure website, which connects to your database. Then the Windows Phone can talk to the server using a RESTFUL interface, ie JSON carried by HTTP.
Store data on the phone in local storage. I really would not try to run a database on Windows Phone.
See Microsoft ASP.NET Web API > Overview and Getting Started: http://www.asp.net/web-api/videos/getting-started
Wikipedia > Representational state transfer: https://en.wikipedia.org/wiki/Representational_state_transfer
MSDN > HttpClient Class: https://msdn.microsoft.com/en-us/library/system.net.http.httpclient(v=vs.118).aspx