public List <Author> EditComplite(Author author) { using (var context = new AuthorDbContext()) { context.Entry(author).State = EntityState.Modified; context.SaveChanges(); return(context.Authors.ToList()); } }
public void Update(TEntity obj) { table.Attach(obj); _context.Entry(obj).State = EntityState.Modified; }