public static void insert(Task t) { // Task t = new Task { id = 1, name = "dummy", date = "25-10-21" }; //Subtask subtask = new Subtask { id = 2, name = "dumm2", date = "25-10-21", status = "undone" }; // subtask.Task = t; // t.subtasklist.Add(subtask); taskRepo.Insert(t); }
public JsonResult CreateTask(MainTaskViewModel taskDetails) { MainTask taskDetailsResults = new MainTask(taskDetails); _taskRepo.Insert(taskDetailsResults); var json = _taskRepo.GetAll(); return(Json(json)); }