|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ContractEndPoint;
using MvcWebApiProxyGenerator.ViewModels;
namespace MvcWebApiProxyGenerator.Controllers
{
public class HomeController : Controller
{
private MvcProxy _mvcProxy;
private WebApiProxy _webApiProxy;
public HomeController()
{
_mvcProxy = new MvcProxy();
_webApiProxy = new WebApiProxy();
}
public ActionResult Index()
{
ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
return View();
}
public ActionResult MvcCSharpTemplate()
{
DemoViewModel vm = new DemoViewModel();
vm.MethodOneResult = _mvcProxy.GetText();
vm.MethodTwoResult = _mvcProxy.RepeatText("Hello");
return View(vm);
}
public ActionResult MvcJavascriptTemplate()
{
return View();
}
public ActionResult WACSharpTemplate()
{
DemoViewModel vm = new DemoViewModel();
vm.MethodOneResult = _webApiProxy.GetText();
vm.MethodTwoResult = _webApiProxy.RepeatText(new Message() { Text = "Hello" });
return View(vm);
}
public ActionResult WAJavascriptTemplate()
{
return View();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.