コード例 #1
0
        /// <summary>
        /// 获得某人收藏列表
        /// </summary>
        /// <param name="accountId"></param>
        /// <returns></returns>
        public static List <ArticleItemBody> GetStockByAccount(string accountId)
        {
            IMongoQuery AuthorQuery     = Query.EQ(nameof(OwnerId), accountId);
            var         StockList       = MongoDbRepository.GetRecList <Stock>(AuthorQuery);
            var         articleItembody = new List <ArticleItemBody>();

            foreach (var stock in StockList)
            {
                articleItembody.Add(ArticleListManager.GetArticleItemBodyById(stock.ArticleID));
            }
            return(articleItembody);
        }