コード例 #1
0
 /// <summary>
 /// 新闻详情
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 private NewsViewModel GetNewsDetails(int id)
 {
     return(NewsBll.GetNewsDetails(id).Select(n => new NewsViewModel
     {
         Id = n.Id,
         Type = n.Type,
         InTime = n.InTime,
         ViewNum = n.ViewNum,//浏览量
         Source = n.Source,
         Title = n.Title,
         Editor = n.Editor,
         Msg = n.Msg,
         MsgNum = n.MsgNum,
         EditTitle = n.EditTitle,
         Memo = n.Memo,
         Kewords = n.Kewords
     }).FirstOrDefault());
 }