public IHttpActionResult FetchCard([FromUri] CartSearchCriteriaBindingModel model)
        {
            User user = GetCurrentUser();

            CartMobileSearchCriteria cartMobileSearchCriteria = model.ToSearchCriteria(user.Id);

            QueryResult <CartObject> carts = CartMobileService.Obj.FindNew(cartMobileSearchCriteria);

            var result = new PagingBindingModel <CartIndexBindingModel>()
            {
                Items      = carts.Items.Select(x => x.ToCartObjectIndexBindingModel()).ToList(),
                TotalCount = carts.TotalCount
            };

            return(Ok(result));
        }
        public IHttpActionResult FetchCards([FromUri] CartSearchCriteriaBindingModel model)
        {
            User user = GetCurrentUser();

            CartMobileSearchCriteria cartMobileSearchCriteria = model.ToSearchCriteria(user.Id);

            IQueryResult <Cart> carts = CartMobileService.Obj.Find(cartMobileSearchCriteria);

            var result = new PagingBindingModel <CartIndexBindingModel>()
            {
                Items      = carts.Items.Select(x => x.ToCartIndexBindingModel()).ToList(),
                TotalCount = carts.TotalCount
            };

            foreach (var cart in result.Items.ToList())
            {
                cart.Items = ItemMobileService.Obj.GetItemsByCard(cart.Cart.CartId).Select(x => x.ToCartItemBindingModel(ItemMobileService.Obj.GetById(x.ItemId))).ToList();
                cart.Users = CartOwnerMobileService.Obj.GetUsersByCart(cart.Cart.CartId).Select(x => x.ToUserProfileBindingModel(UserService.Obj.FindById(x.UserId), ImageService.Obj.FindByUserId(x.UserId))).ToList();
            }

            return(Ok(result));
        }