// // GET: /AbstractFactory/Submit // // Process a submission. // public IActionResult Submit(string format, string headingText, string paragraphText) { // get the proper document factory for the output type IDocumentFactory factory = DocumentCreatorSingleton.GetInstance().GetDocumentFactory(format); // create the document parts IHeading headingObj = factory.CreateHeading(1, headingText); IParagraph paragraphObj = factory.CreateParagraph(paragraphText); return(View("~/Views/Shared/Results.cshtml", headingObj.GetString() + paragraphObj.GetString())); }