Exemple #1
0
        public void GetByTAGZ_Test()
        {
            ITags <Journal>          tagDB = new JournalData();
            IDataRepository <Person> peron = new PersonData();
            var person = peron.GetById(3);
            var result = tagDB.GetByTag(person);

            foreach (var item in result)
            {
                Console.WriteLine(item.Title);
            }
        }
Exemple #2
0
        public void GetByTag_Text_Test()
        {
            // Get Tag by tag text
            ITag <Journal>            uu = new JournalData();
            IDataRepository <Content> ui = new CommentData();
            Tag tag = new Tag();

            tag.TagText = "progress";
            var journals = uu.GetByTag(tag);

            foreach (var journal in journals)
            {
                Console.WriteLine($"{journal.Title}");
            }
        }
Exemple #3
0
        public void GetByTag_User_Test()
        {
            // Get tag by user
            IDataRepository <Person> getUser = new PersonData();
            var user = getUser.GetById(2);
            Tag tag  = new Tag()
            {
                UserTag = user
            };
            ITag <Journal> getbytag = new JournalData();
            var            journals = getbytag.GetByTag(tag);

            foreach (var journal in journals)
            {
                Console.WriteLine($"{journal.Title}");
            }
        }