Пример #1
0
 public FeedPostModel(Post post) : base(post)
 {
     PostedBy = new FeedUserModel(post.User);
     Likes    = post.Interactions
                .Where(i => i.Type == InteractionType.LIKE)
                .Select(i => new FeedInteractionModel(i));
     Dislikes = post.Interactions
                .Where(i => i.Type == InteractionType.DISLIKE)
                .Select(i => new FeedInteractionModel(i));
 }
Пример #2
0
 public FeedInteractionModel(Interaction interaction) : base(interaction)
 {
     User = new FeedUserModel(interaction.User);
 }