Esempio n. 1
0
        private async void OnSearchRequest(SearchQueryEventArgs <Order> args)
        {
            try
            {
                Orders.Clear();
                var ids = await GetIDsBy(args.QueryBuilder);

                Load(o => ids.Contains(o.Id), h => h.Hardwares, c => c.Customer, s => s.OrderStatus, t => t.OrderType);
            }
            catch (Exception ex)
            {
                _logger.Error(ex);
            }
        }
Esempio n. 2
0
 private async void OnSearchRequest(SearchQueryEventArgs <Customer> args)
 {
     try
     {
         await GetIDsBy(args.QueryBuilder)
         .ContinueWith((t) =>
         {
             Load(c => t.Result.Contains(c.Id), a => a.CustomerAddresses);
         },
                       TaskContinuationOptions.ExecuteSynchronously);
     }
     catch (Exception ex)
     {
         _logger.Error(ex);
     }
 }