private MigrationViewModel ReadData(string fileName) { MigrationViewModel migrationViewModel = new MigrationViewModel(); migrationViewModel.FileName = fileName; if (!string.IsNullOrEmpty(fileName)) { var path = Path.Combine( Directory.GetCurrentDirectory(), "wwwroot/datafiles", migrationViewModel.FileName); //Read data here XMLParser xmlParser = new XMLParser(path); migrationViewModel.MigrationUsers = xmlParser.GetUsers(); migrationViewModel.MigrationPatients = xmlParser.GetPatients(); migrationViewModel.MigrationContacts = xmlParser.GetContacts(); migrationViewModel.MigrationAccountHolders = xmlParser.GetAccountHolders(); } return(migrationViewModel); //return View("Index", migrationViewModel); }