示例#1
0
 public dynamic RetrieveTasks()
 {
     var db = Database.Opener.OpenFile(DatabasePath);
     var tasks = db.Tasks.All().ToList<Task>();
     var taskList = new TaskListModel(tasks, hostName);
     return taskList ;
 }
示例#2
0
        public static Link Create(TaskListModel taskList, string hostName)
        {
            //we don't need to use taskList to build the self link
            var self = new Link
                {
                    Rel = "self",
                    HRef = string.Format("http://{0}/{1}", hostName, "tasks")
                };

            return self;
        }
示例#3
0
文件: Link.cs 项目: vendre21/Brighter
        public static Link Create(TaskListModel taskList, string hostName)
        {
            //we don't need to use taskList to build the self link
            var self = new Link
            {
                Rel  = "self",
                HRef = string.Format("http://{0}/{1}", hostName, "tasks")
            };

            return(self);
        }
示例#4
0
 public dynamic RetrieveTasks()
 {
     var tasks = _tasksDao.FindAll();
     var taskList = new TaskListModel(tasks, _hostName);
     return taskList;
 }