Beispiel #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="batch">Batch add this request to</param>
        /// <param name="expressions">The properties to select</param>
        /// <returns>The Domain Model object</returns>
        internal static IBatchResult LoadBatch <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).GetAwaiter().GetResult());
        }
Beispiel #2
0
        /// <summary>
        /// Loads 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 void Load <TModel>(this IDataModelCollectionLoad <TModel> dataModelLoad, params Expression <Func <TModel, object> >[] expressions)
        {
            if (dataModelLoad == null)
            {
                throw new ArgumentNullException(nameof(dataModelLoad));
            }

            dataModelLoad.LoadAsync(expressions).GetAwaiter().GetResult();
        }
Beispiel #3
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 Task <IBatchResult> LoadBatchAsync <TModel>(this IDataModelCollectionLoad <TModel> dataModelLoad, params Expression <Func <TModel, object> >[] expressions)
        {
            if (dataModelLoad == null)
            {
                throw new ArgumentNullException(nameof(dataModelLoad));
            }

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