Esempio n. 1
0
 private void InitializeTopicFollowing()
 {
     _topic = new Topic {
         Id = 1
     };
     _following = new TopicFollowing("1", _topic.Id);
 }
Esempio n. 2
0
        public static TopicFollowing AddTestTopicFollowingToDatabase(this iKnowContext context, int topicId)
        {
            var topicFollowing = new TopicFollowing(context.Users.First().Id, topicId);

            context.TopicFollowings.Add(topicFollowing);
            context.SaveChanges();

            context.Entry(topicFollowing).Reload();
            return(topicFollowing);
        }