Listing tasks
In the preceding snippet, after the task is created, a redirect to an index page is performed. This page is a list page used to view tasks. Building a list page requires finding all our tasks that will require a slight change to our model:
public class Task { public string Description { get; set; } public bool IsComplete { get; set; } public bool Type { get { return "task"; } }
Recall our discussion from the previous chapters on the use of a type
property on documents to provide a classification for related documents, much in the way a table does for relational databases. In our to-do application, to identify tasks, we'll add a type
property (which is read-only). The property is set to the task
string, which will ensure that all task ...
Get Couchbase Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.