Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public IActionResult DataBase()
        {
            CreateTextDocument create = new CreateTextDocument();

            return(View(create.GetUser()));
        }