public void AddNewTask(CoupleAddNewTaskVM newTaskVM) { Entities.Task task = new Entities.Task() { TaskDescription = newTaskVM.TaskDescription, DueDate = newTaskVM.DueDate, TaskNote = newTaskVM.TaskNote, TaskStatus = newTaskVM.SelectedTaskStatus.ToString(), Userref = Userref() }; context.Task.Add(task); context.SaveChanges(); }
public void AddNewTask(CoupleAddNewTaskVM newTaskVM) { var temp = Userref(); Entities.Task task = new Entities.Task() { TaskDescription = newTaskVM.TaskDescription, DueDate = newTaskVM.DueDate, TaskNote = newTaskVM.TaskNote, TaskStatus = newTaskVM.TaskStatus, Userref = temp }; context.Task.Add(task); context.SaveChanges(); }