コード例 #1
0
        /// <summary>
        /// An example of a method to retrieve a collection of entities.
        /// </summary>
        /// <param name="orderByPropertyName"></param>
        /// <returns>List of customers</returns>
        public Task <IEnumerable <Customer> > GetCustomersAsync(string orderByPropertyName)
        {
            IEntityQuery <Customer> query = Manager.Customers;

            if (orderByPropertyName != null)
            {
                var selector = new SortSelector(typeof(Customer), orderByPropertyName);
                query = query.OrderBySelector(selector);
            }

            return(query.ExecuteAsync());
        }