예제 #1
0
        public JsonResult GenerateText(int id)
        {
            var          filterInDb = _context.Filters.SingleOrDefault(f => f.Id == id);
            StreamWriter filterText = GenerateFilter.CreateTempFile(filterInDb.Name);

            filterText.WriteLine("#Description: " + filterInDb.Description);

            var             itemsInDb = _context.UsersItems.Where(i => i.FilterId == id).Select(i => i).OrderBy(i => i.RowId);
            List <ItemUser> itemsList = new List <ItemUser>();

            itemsList.AddRange(itemsInDb);

            GenerateFilter.SaveItems(filterText, itemsList, filterInDb);

            return(Json(new { fileName = filterInDb.Name }, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
 public static IArray2d <R> Select <T, R>(this IRelQueryableArray2d <T> source, Kernel <T, R> kernel)
 => GenerateFilter(kernel)(source);
예제 #3
0
 public static IArray2d <R> Select <T, R>(this T[,] source, Func <T, R> kernel)
 => GenerateFilter <T, R>((cell) => kernel(cell[0, 0]))(source.Wrap(Bounds.Skip));