Пример #1
0
        //Search
        public async Task <JsonResult> Search(AddressSearchQuery model)
        {
            var result = new AddressResults();

            try
            {
                var response = await userService.GetAllAddressAsync(model);

                result.Addresses = response.Addresses;
                result.Total     = response.Total;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }

            return(Json(result, JsonRequestBehavior.AllowGet));
        }