public void PartialSelectionReturnsNullAtCompileIfEmpty() { IPartialSelection <UserEntity, UserDto> selection = DummyQuery <UserEntity>() .PartialSelect <UserDto>(); Expression <Func <UserEntity, UserDto> > expression = selection.Compile(); Assert.That(expression, Is.Null); }
/// <inheritdoc /> public virtual FlowQuerySelection <TDestination> Select <TDestination> ( IPartialSelection <TSource, TDestination> combiner ) { if (combiner == null) { throw new ArgumentNullException("combiner"); } if (combiner.Count == 0) { throw new ArgumentException("No projection is made in ExpressionCombiner'2", "combiner"); } Expression <Func <TSource, TDestination> > expression = combiner.Compile(); return(Select(expression)); }
/// <inheritdoc /> public virtual void Select <TDestination> ( IResultStream <TDestination> stream, IPartialSelection <TSource, TDestination> combiner ) { if (combiner == null) { throw new ArgumentNullException("combiner"); } if (combiner.Count == 0) { throw new ArgumentException("No projection is made in ExpressionCombiner'2", "combiner"); } Expression <Func <TSource, TDestination> > expression = combiner.Compile(); Select(stream, expression); }