Example #1
0
        public IPageable <FieldsetDisplay> GetDisplayPageable(int page, int pageSize)
        {
            var pageable = u.GetPageable <Fieldset>(page, pageSize);
            var states   = u.GetAll <FieldsetState>();
            var displays = new Pageable <FieldsetDisplay>();

            displays.InjectFrom(pageable);
            displays.Page = pageable.Page.Join(states, fs => fs.StateId, s => s.Id, (fs, s) =>
                                               new FieldsetDisplay
            {
                Id    = fs.Id,
                Year  = fs.Year,
                Name  = fs.Name,
                State = s.Name
            }).ToArray();

            return(displays);
        }