예제 #1
0
 public Article Update(Article article)
 {
     _databasecontext.Entry(article).State = EntityState.Modified;
     _databasecontext.SaveChanges();
     return article;
 }
예제 #2
0
 public void Delete(Article article)
 {
     _databasecontext.Articles.Remove(article);
     _databasecontext.SaveChanges();
 }
예제 #3
0
 public Article Add(Article article)
 {
     _databasecontext.Articles.Add(article);
     _databasecontext.SaveChanges();
     return article;
 }