Ejemplo n.º 1
0
 /// <summary>
 ///     Creates a new <see cref="IDetachedFlowQuery{TSource}" /> query.
 /// </summary>
 /// <param name="alias">
 ///     The alias.
 /// </param>
 /// <param name="options">
 ///     The options.
 /// </param>
 /// <typeparam name="TSource">
 ///     The <see cref="System.Type" /> of the source entity.
 /// </typeparam>
 /// <returns>
 ///     The created <see cref="IDetachedFlowQuery{TSource}" /> query.
 /// </returns>
 public static IDetachedFlowQuery <TSource> For <TSource>
 (
     Expression <Func <TSource> > alias,
     FlowQueryOptions options = null
 )
     where TSource : class
 {
     return(new DetachedFlowQuery <TSource>
            (
                null,
                SessionExtensions.Alias(alias) ?? SessionExtensions.RootAlias,
                options
            ));
 }