コード例 #1
0
 protected NewsSentGridModel MapToGridModel(NewsSent item)
 {
     return(new NewsSentGridModel()
     {
         ID = item.ID,
         NewsTitle = item.News.Title,
         UserGroupName = item.UserGroupId.ToString(),
         UserGroupId = item.UserGroupId,
         SentDate = item.SentDate
     });
 }
コード例 #2
0
 protected NewsSentModel MapToModel(NewsSent item)
 {
     return(new NewsSentModel()
     {
         ID = item.ID,
         NewsID = item.NewsID,
         UserGroupId = item.UserGroupId,
         SentDate = item.SentDate,
         News = MapToModel(item.News),
         UserGroup = new UserGroupModel()
         {
             ID = item.UserGroupId
         }
     });
 }