public void Update(TEntity entity) { try { context.Entry(entity).State = EntityState.Modified; context.SaveChanges(); } catch (Exception error) { Console.WriteLine(error.ToString()); } }
public void Save() { context.SaveChanges(); }