public static NewsCategoryInfo ToDataInfo(this NewsCategory entity)
 {
     return(new NewsCategoryInfo
     {
         Id = entity.Id,
         Name = entity.Title,
     });
 }
 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,
     });
 }
 public static NewsCategoryInfo ToIfNotNullDataInfo(this NewsCategory entity)
 {
     return(entity?.ToDataInfo());
 }