Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well, to achieve your goal, I would do:</p> <ol> <li><p>Build a REST webservice with ASP.NET Web API (<a href="http://www.asp.net/web-api">http://www.asp.net/web-api</a>) which returns objects (those objects will be translated to json automatically). For example:</p> <pre><code>public class MyObject { public string Content { get; set; } } </code></pre> <p>Controller for it:</p> <pre><code>public class TestController : ApiController { [HttpGet] public MyObject Example() { return new MyObject() { Content = "Hello World!" }; } } </code></pre></li> <li><p>Use a HTTP client in your win phone project:</p> <pre><code>HttpClient client = new HttpClient(); client.BaseAddress = new Uri("http://mywebservice.com"); client.DefaultRequest.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); using (var result = await client.GetStreamAsync("test/example")) { var serializer = new JsonSerializer(); // this is json.net serializer using (var streamReader = new StreamReader(result)) { using (var jsonReader = new JsonTextReader(streamReader)) { var obj = serializer.Deserialize&lt;MyObject&gt;(jsonReader); // you can access obj.Content now to get the content which was created by the webservice // in this example there will be "Hello World!" } } } </code></pre></li> </ol> <p>Sure you can create much more complex objects which will be (de)serialized. Just take a look at the Web API tutorials.</p> <p>Within your webservice you can now access any database you want.</p> <p><strong>Edit</strong> If you need a more detailed answer, leave me a comment.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload