public IHttpActionResult post(tblTask item)
        {
            ProjectBAL obj = new ProjectBAL();

            obj.AddTask(item);
            return(Ok("Record added"));
        }
Esempio n. 2
0
        public void AddTask()
        {
            ProjectBAL obje  = new ProjectBAL();
            int        count = obje.GetTask().Count();
            //dynamic testtask = new (Task) list<Task>;
            tblTask T = (new tblTask {
                TaskName = "Testtaskname", TStartDate = DateTime.Now, TEndDate = DateTime.Now, TPriority = 10, TStatus = false, ParentTaskName = "parenttask", UserId = 1
            });

            obje.AddTask(T);
            int count1 = obje.GetTask().Count();

            Assert.AreEqual(count1, count + 1);
        }