private static IEnumerable <Tuple <string, object> > CreateQuery(StatusInsertBatch batch) { return(EnumerableEx.Concat( new[] { Tuple.Create(_statusInserter, (object)batch.Status) }, new[] { _statusEntityCrud.CreateDeleter(batch.Status.Id) }, batch.StatusEntities.Select(e => Tuple.Create(_statusEntityInserter, (object)e)))); }