public void AddOrUpdate(TDbEntity dbEntity, bool @new = false) { if (@new) { EntitiesSet.Add(dbEntity); } else { Context.Entry(dbEntity).State = EntityState.Modified; } }
public void Add(TDbEntity dbEntity) { EntitiesSet.Add(dbEntity); }