Beispiel #1
0
 public static Link Create(Task task, string hostName)
 {
     var link = new Link
         {
             Rel = "item",
             HRef = string.Format("http://{0}/{1}/{2}", hostName, "task", task.Id)
         };
     return link;
 }
Beispiel #2
0
 public void Update(Task task)
 {
     db.Tasks.UpdateById(task);
 }
Beispiel #3
0
 private static Task GetTask()
 {
     return foundTask ?? (foundTask = dao.FindById(addedTask.Id));
 }
Beispiel #4
0
 public Task Add(Task newTask)
 {
     return db.Tasks.Insert(newTask);
 }