private void InitializeTopicFollowing() { _topic = new Topic { Id = 1 }; _following = new TopicFollowing("1", _topic.Id); }
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); }