예제 #1
0
        /// <summary>
        /// Batches the load of the list from the remote data source, eventually selecting custom properties or using a default set of properties
        /// </summary>
        /// <param name="dataModelLoad"></param>
        /// <param name="expressions">The properties to select</param>
        /// <returns>The Domain Model object</returns>
        internal static IBatchResult LoadBatch <TModel>(this IDataModelCollectionLoad <TModel> dataModelLoad, params Expression <Func <TModel, object> >[] expressions)
        {
            if (dataModelLoad == null)
            {
                throw new ArgumentNullException(nameof(dataModelLoad));
            }

            return(dataModelLoad.LoadBatchAsync(expressions).GetAwaiter().GetResult());
        }
예제 #2
0
        /// <summary>
        /// Batches the load of the list from the remote data source, eventually selecting custom properties or using a default set of properties
        /// </summary>
        /// <param name="dataModelLoad"></param>
        /// <param name="batch">Batch add this request to</param>
        /// <param name="expressions">The properties to select</param>
        /// <returns>The Domain Model object</returns>
        public static Task <IBatchResult> LoadBatchAsync <TModel>(this IDataModelCollectionLoad <TModel> dataModelLoad, Batch batch, params Expression <Func <TModel, object> >[] expressions)
        {
            if (dataModelLoad == null)
            {
                throw new ArgumentNullException(nameof(dataModelLoad));
            }

            return(dataModelLoad.LoadBatchAsync(batch, expressions));
        }