Пример #1
0
        /// <summary>
        /// Hide a Post
        /// </summary>
        /// <param name="postId">Id of a Post</param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public Boolean HidePost(string postId, string userId)
        {
            RestrictedPost restrictedPost = new RestrictedPost
            {
                PostId = postId,
                UserId = userId
            };

            restrictedPostRepo.Add(restrictedPost);

            return(true);
        }
Пример #2
0
 public void Pupolate()
 {
     for (var i = 0; i < 100; i++)
     {
         var post           = postRepo.Get().Skip(NumberFaker.Number(1, 100)).First();
         var restrictedPost = new RestrictedPost()
         {
             PostId = post.Id.ToString(),
             UserId = post.UserId
         };
         restrictedPostRepo.Add(restrictedPost);
     }
 }