public void CountTest() { IDaoFactory daoFactory = new DaoFactory("projects", 0); Task task = daoFactory.GetTaskDao().GetById(1337); Console.WriteLine(daoFactory.GetCommentDao().Count(task)); }
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)); }
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); }