public virtual void Update(T entity) { try { EntityState entityState = _siriusContext.GetEntityState(entity); if (entityState == EntityState.Detached) { _dbSet.Attach(entity); } if (_siriusContext != null) _siriusContext.SetModified(entity); SaveChanges(); } catch (DbEntityValidationException dbex) { var msg = dbex.EntityValidationErrors.ToList(); } catch (DbUpdateException ex) { _exceptionParser.ThrowUniqueConstraintException(ex); } catch (AmbiguousMatchException ex) { Log.Error("Ambiguous Match Exception", ex); throw ex; } }for a one row update. Now I just want to use
public virtual void Update(List<T> entities)
So, would I need to add transactions here and loop through the list or there is a better method available?