Exemple #1
0
        public void TestFilter()
        {
            //List<Data.Item> items;
            //string f = "tre";

            //using (Librarian.Data.LibraryDataContext ctx = new Data.LibraryDataContext())
            //    items = ctx.Items
            //        .Include(i => i.Authors)
            //        .Include(i => i.Editions.Select(ed => ed.Copies))
            //        .Include(i => i.ItemSubjects)
            //        .Include(i => i.Reserves)
            //        .Where(i => !i.Deleted).Where(i => i.Title.Contains(f))
            //        .OrderBy(i => i.Title)
            //        .Skip(0).Take(20)
            //        .ToList();

            //    int t;
            Itemizing.GetAllItems("chinuch", 20, 0);
        }
Exemple #2
0
 public ActionResult IndexData(int pageNum, int pageSize, string filter)
 {
     return(Content(JsonConvert.SerializeObject(new
     {
         items = Mapper.Map <IEnumerable <Data.Item>, IEnumerable <Models.Item> >(Itemizing.GetAllItems(filter, pageSize, pageNum)),
         pageNum = pageNum
     })));
 }