/// <summary>
 /// To add parent task
 /// </summary>
 /// <param name="oTask"></param>
 /// <returns></returns>
 public ParentTasks AddParentTask(ParentTasks oTask)
 {
     using (var context = new ProjectManagerContext())
     {
         oTask = context.ParentTasks.Add(oTask);
         context.SaveChanges();
         return(oTask);
     }
 }
 /// <summary>
 /// to update parent task
 /// </summary>
 /// <param name="oTask"></param>
 /// <returns></returns>
 public ParentTasks UpdateParentTask(ParentTasks oTask)
 {
     using (var context = new ProjectManagerContext())
     {
         oTask = context.ParentTasks.Attach(oTask);
         context.Entry(oTask).State = EntityState.Modified;
         context.SaveChanges();
         return(oTask);
     }
 }