Exemplo n.º 1
0
 public void Update(Comments comment)
 {
     using (var context = new ApplicationDbContext())
     {
         context.Entry(comment).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Exemplo n.º 2
0
 public void Add(Comments comment)
 {
     using (var context = new ApplicationDbContext())
     {
         context.Comments.Add(comment);
         context.SaveChanges();
     }
 }