public IHttpActionResult GetParentTaskById(int id)
        {
            IHttpActionResult retResult = null;
            ParentTasks       ptaskData = new ParentTasks();

            try
            {
                ptaskData = objPtaskRepo.GetParentTaskById(id);
                if (ptaskData == null)
                {
                    retResult = NotFound();
                }

                retResult = Ok(ptaskData);
            }
            catch (ApplicationException ex)
            {
                throw new HttpResponseException(new HttpResponseMessage {
                    StatusCode = HttpStatusCode.BadRequest, ReasonPhrase = ex.Message
                });
            }
            catch (Exception ex)
            {
                throw new HttpResponseException(new HttpResponseMessage {
                    StatusCode = HttpStatusCode.BadGateway, ReasonPhrase = ex.Message
                });
            }

            return(retResult);
        }
        public void GetParentTaskByIdBenchmark()
        {
            ParentTasks firstParent = randomParents.First();
            ParentTasks getParent   = parentRepository.GetParentTaskById(firstParent.ParentTaskId);

            _counter.Increment();
        }
        public void TestGetParentTaskById()
        {
            ParentTasks firstParent = randomParents.First();
            ParentTasks getParent   = parentRepository.GetParentTaskById(firstParent.ParentTaskId);

            Assert.IsNotNull(getParent);
            Assert.AreEqual(firstParent.ParentTaskId, getParent.ParentTaskId);
            Assert.AreEqual(firstParent.ProjectID, getParent.ProjectID);
        }