Beispiel #1
0
        public IActionResult Upload(IFormFile file)
        {
            if (file != null && file.Length > 0)
            {
                try
                {
                    var fileManager = new CsvFileManager();
                    return(View("Index", fileManager.ParseFileData(file)));
                }
                catch
                {
                    return(RedirectToAction("Error"));
                }
            }

            return(RedirectToAction("Index"));
        }