public IActionResult Index(User user) { CreateWord createWord = new CreateWord(); createWord.Create(user); CreateTextDocument createText = new CreateTextDocument(); createText.AddToDataBase(user); string file_path = Path.Combine(_appEnvironment.ContentRootPath, $"Files/{user.Name} {user.Surname}.docx"); string file_type = "application/docx"; string file_name = $"{user.Name} {user.Surname}.docx"; return(PhysicalFile(file_path, file_type, file_name)); }
public IActionResult DataBase() { CreateTextDocument create = new CreateTextDocument(); return(View(create.GetUser())); }