Exemplo n.º 1
0
        public void CountTest()
        {
            IDaoFactory daoFactory = new DaoFactory("projects", 0);

            Task task = daoFactory.GetTaskDao().GetById(1337);
            Console.WriteLine(daoFactory.GetCommentDao().Count(task));
        }
Exemplo n.º 2
0
        public void SaveOrUpdateTest()
        {
            var daoFactory = new DaoFactory("projects", 0);
            var task = daoFactory.GetTaskDao().GetById(187);
            var participant = new Participant(SecurityContext.CurrentAccount.ID);

            Console.WriteLine(task.UniqID);
            daoFactory.GetParticipantDao().Read(participant.ID, task.UniqID, DateTime.Now);
            Console.WriteLine(daoFactory.GetParticipantDao().WhenReaded(participant.ID, task.UniqID));
        }
Exemplo n.º 3
0
        public void SaveOrUpdate()
        {
            IDaoFactory daoFactory = new DaoFactory("projects", 0);

            Task task = daoFactory.GetTaskDao().GetById(25);

            Comment comment = new Comment
                                  {
                                      Content = "ghb",
                                      TargetUniqID = typeof(Task).Name + task.ID.ToString(),
                                  };

            // task.Comments.Add(comment);

            daoFactory.GetCommentDao().Save(comment);

            Console.WriteLine(comment.ID);
        }