protected async Task Any(Type type, Expression <Func <IDocument <Guid>, bool> > predicate) { if (type.IsATypeOf(typeof(Parent))) { _any = await _unitOfWork.AnyAsync <Parent>(predicate); } if (type.IsATypeOf(typeof(Child))) { _any = await _unitOfWork.AnyAsync <Child>(predicate); } if (type.IsATypeOf(typeof(Event))) { _any = await _unitOfWork.AnyAsync <Event>(predicate); } }