public void Can_SearchByDate()
        {
            var production1 = new Models.Data.EggProduction
            {
                Id   = Guid.NewGuid(),
                Date = DateTime.Today,
            };

            var production2 = new Models.Data.EggProduction
            {
                Id   = Guid.NewGuid(),
                Date = DateTime.Today.AddDays(-3)
            };

            using (var conn = factory.OpenDbConnection())
            {
                conn.InsertParam(production1);
                conn.InsertParam(production2);
            }

            var result = service.Search(new DateRangeSearchInfo
            {
                Start     = DateTime.Today.AddDays(-1),
                End       = DateTime.Today.AddDays(10),
                PageIndex = 1,
                PageSize  = 10
            });

            Assert.Equal(1, result.Total);
            Compare(production1, null, result.Items[0]);
        }
        public SearchResult <EggProduction> GetByCriteria(int page, int limit, DateTime?start = null, DateTime?end = null)
        {
            var searchInfo = new DateRangeSearchInfo
            {
                Start     = start,
                End       = end,
                PageIndex = page,
                PageSize  = limit
            };

            return(service.Search(searchInfo));
        }
        void OnRefresh(object param)
        {
            var searchInfo = new DateRangeSearchInfo
            {
                Start     = startDate,
                End       = endDate,
                PageIndex = pageIndex,
                PageSize  = pageSize
            };
            var result = service.Search(searchInfo);

            ProductionList         = new ObservableCollection <Models.EggProduction>(result.Items);
            TotalRecords           = result.Total;
            DeleteCommand.EntityId = Guid.Empty;
        }