Example #1
0
 private News MapNews(MySqlDataReader reader)
 {
     return(new News()
     {
         Id = reader.GetIntOrDefault("news_id").Value,
         Name = reader.GetStringOrDefault("news_name"),
         ShortDescription = reader.GetStringOrDefault("news_short_description"),
         Description = reader.GetStringOrDefault("news_description"),
         Path = reader.GetStringOrDefault("news_path"),
         Date = reader.GetDateTimeOrDefault("news_date").Value
     });
 }