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; }
public void Update(Task task) { db.Tasks.UpdateById(task); }
private static Task GetTask() { return foundTask ?? (foundTask = dao.FindById(addedTask.Id)); }
public Task Add(Task newTask) { return db.Tasks.Insert(newTask); }