Exemple #1
0
 public IActionResult Edit(Data.Lesson model)
 {
     model.date_modified   = DateTime.Now;
     db.Entry(model).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public virtual void Update(T entity)
 {
     dbSet.Attach(entity);
     dataContext.Entry(entity).State = EntityState.Modified;
 }