Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Edit: see blog post of Steven over here with sample download code: <a href="http://blog.stevensanderson.com/2012/03/06/single-page-application-packages-and-samples/">http://blog.stevensanderson.com/2012/03/06/single-page-application-packages-and-samples/</a></strong> </p> <p>Don't know either how to access the helper, would love to know so I can play with it :-)</p> <p>This seems to do the trick for now: </p> <pre><code>&lt;script src="../../Scripts/knockout-2.0.0.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../../Scripts/upshot.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../../Scripts/upshot.compat.knockout.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; upshot.metadata({ "CLASSNAME:#NAMESPACE":{ "key": ["aId"], "fields": { "aId": { "type": "Int32:#System" }, "Title": { "type": "String:#System" }, "Description": { "type": "String:#System" }, "Effort": { "type": "Double:#System" } } } }); var myDataSource = new upshot.RemoteDataSource({ providerParameters: { url: "http://localhost:7018/api/CONTROLLERNAME", operationName: "", operationParameters: {} }, entityType: "CLASSNAME:#NAMESPACE" }); myDataSource.refresh(function (results) { alert(results[0].Title()); }); &lt;/script&gt; </code></pre> <p>You need to replace CLASSNAME:#NAMESPACE with your classname and namespace, so for example: "WorkItem:#MySystem.Models". </p> <p>And replace the CONTROLLERNAME with the actual name of the controller, in the case of this</p> <pre><code>public class MyTasksController : ApiController </code></pre> <p>you will need to replace CONTROLLERNAME with MyTasks</p> <p>And fill the stuff inside the metadata according to your model objects. I hope the code samples come online soon, because this is a lot of work :-(</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. 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.
    3. 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