public void InsertNews(News news)
 {
     using (var cnn = OpenConnection())
       {
     var id =   cnn.Insert(news);
       }
 }
 public void UpdateNews(News news)
 {
     using (var cnn = OpenConnection())
       {
        cnn.Update(news);
       }
 }
Example #3
0
        public News Map(NewsForm form)
        {
            var news = new News();
            news.Title = form.Title;
            news.Description = form.Description;
            news.Date = DateTime.Now;

            return news;
        }