public Task AddTask(HttpRequestMessage requestMessage, Task newTask)
 {
     return new Task
     {
         Subject = "In v2, newTask.Subject = " + newTask.Subject
     };
 }
 public virtual void UpdateTaskUsers(Task task, IEnumerable<long> userIds, bool appendToExisting)
 {
     if (!appendToExisting)
     {
         task.Users.Clear();
     }
     if (userIds != null)
     {
         foreach (var user in userIds.Select(GetValidUser))
         {
             if (!task.Users.Contains(user))
             {
                 task.Users.Add(user);
             }
         }
     }
 }
 public void UpdateTaskStatus(Task taskToUpdate, string statusName)
 {
     var status = _session.QueryOver<Status>().Where(x => x.Name == statusName).SingleOrDefault();
     taskToUpdate.Status = status;
     _session.SaveOrUpdate(taskToUpdate);
 }