public void AddTask(ParentTasks TasksModel)
        {
            var TaskDBcontext = new TaskDBEntities();
            var task          = new ParentTask();

            task.Parent_ID   = TasksModel.Parent_ID;
            task.Parent_Task = TasksModel.Parent_Task;
            TaskDBcontext.ParentTasks.Add(task);
            TaskDBcontext.SaveChanges();
        }
Ejemplo n.º 2
0
 public void AddTask(ParentTasks model)
 {
     using (var TaskDBcontext = new TaskDBEntities())
     {
         var task = new ParentTask();
         task.Parent_ID   = model.Parent_ID;
         task.Parent_Task = model.Parent_Task;
         task.Project_ID  = model.Project_ID;
         TaskDBcontext.ParentTasks.Add(task);
         TaskDBcontext.SaveChanges();
     }
 }