示例#1
0
        public HomeViewModel post_add_task(TaskPostInputModel input)
        {
            task item = new task();

            item.task1 = input.Task;
            _context.AddTask(item);

            return(new HomeViewModel
            {
                Informative = "Added task: " + input.Task,
                Tasks = _context.GetTasks()
            });

            //return FubuContinuation.RedirectTo<HomeEndpoint>(x => x.get_index(new HomeViewModel {Informative = "Added task " + input.AddTask}));
        }
 public void AddTask(TaskModel task)
 {
     _context.AddTask(task);
 }
 public void AddTask(EducationObject toAddTask)
 {
     _context.AddTask(toAddTask);
 }