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)); }
public static IArray2d <R> Select <T, R>(this IRelQueryableArray2d <T> source, Kernel <T, R> kernel) => GenerateFilter(kernel)(source);
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));