Question

I worked on windows phone 8 App that the user can create a list of favorite places and this places will stored in a local DB in the phone. I need to make a hosted database that the App can store this places in it. I known from some developers that i can do this through WCF Web service but i don't know the real steps to create the WCF for this solution and hosted it to IIS server.

Thanks in advance

Was it helpful?

Solution

What you could do is to create endpoints around your DB operations, such as inserting a favorite place, deleting a favorite place, or updating a favorite place. This endpoints will be called in your WP8 app. To call your endpoints you'll need to deploy your service. Here you'll find a short tutorial on how to deploy a WCF service from Visual Studio to an IIS. The creation of the service itself depends on your exact use case and how you'll do the mapping to the database (for example with Entity Framework with its code-first or database-first strategies).

As an alternative you could use ASP.NET Web API, which in my opinion is easier to use than WCF. Another advantage is the RESTful architecture of Web API. That allows you to call your service from almost all devices or platforms.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top