Exemplo n.º 1
0
 public static NewsCategoryInfo ToDataInfo(this NewsCategory entity)
 {
     return(new NewsCategoryInfo
     {
         Id = entity.Id,
         Name = entity.Title,
     });
 }
Exemplo n.º 2
0
 public static NewsCategoryResult ToDataResult(this NewsCategory news)
 {
     return(news == null ? null : new NewsCategoryResult
     {
         Id = news.Id,
         CreateDate = news.CreateDate,
         CreatedBy = news.CreatedBy,
         IsDeleted = news.IsDeleted,
         LastUpdated = news.LastUpdated,
         LastUpdatedBy = news.LastUpdatedBy,
         MoTa = news.MoTa,
         Ten = news.Title,
     });
 }
Exemplo n.º 3
0
 public static NewsCategoryInfo ToIfNotNullDataInfo(this NewsCategory entity)
 {
     return(entity?.ToDataInfo());
 }