static void Main(string[] args) { //var text = "մենք բոլորով հավաքվել ենք բղդո ձաձայենց տանը :)"; //var translator = new ArmenianToTranslite(); //translator.TranslateAndWriteToFile(text); //translator.DeleteTranslatedFile(); //var dt = new DirectoryTreeVisualizer(); //dt.DirectorySearch(@"D:\screen capture\"); //var directoryPath = @"C:\Users\HP\Desktop\Backup"; var directoryPath = Console.ReadLine(); var organizer = new SortFiles(); organizer.SortFilesByExtension(directoryPath); Console.ReadKey(); }
public async Task <IActionResult> Index(int Id, SortFiles sortFiles = SortFiles.NumberOfChangeDefault) { IQueryable <Files> files = _context.Files.Where(x => x.Analysis.Id == Id); ViewData["sortFiles"] = sortFiles == SortFiles.NumberOfChangeAsc ? SortFiles.NumberOfChangeDesc : SortFiles.NumberOfChangeAsc; switch (sortFiles) { case SortFiles.NumberOfChangeAsc: files = files.OrderBy(s => s.NumberOfChange); break; case SortFiles.NumberOfChangeDesc: files = files.OrderByDescending(s => s.NumberOfChange); break; } return(View(await files.AsNoTracking().ToListAsync())); }