public ActionResult Index() { var vm = new OAuthClientIndexViewModel(this.clientRepository); return View("Index", vm); }
public ActionResult Menu() { var list = new OAuthClientIndexViewModel(this.clientRepository); if (list.Clients.Any()) { var vm = new ChildMenuViewModel { Items = list.Clients.Select(x => new ChildMenuItem { Controller = "OAuthClient", Action = "Edit", Title = x.Name, RouteValues = new { id = x.ID } }).ToArray() }; return PartialView("ChildMenu", vm); } return new EmptyResult(); }