public void UpdateArticles(Articles news)
 {
     using (var cnn = OpenConnection())
     {
         cnn.Update(news);
     }
 }
 public void InsertArticles(Articles article)
 {
     using (var cnn = OpenConnection())
     {
         var id = cnn.Insert(article);
     }
 }
예제 #3
0
        public Articles Map(ArticlesForm form)
        {
            var articles = new Articles();
            articles.Title = form.Title;
            articles.Description = form.Description;
            articles.Date = DateTime.Now;

            return articles;
        }