Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }