Example #1
0
        public ActionResult Index()
        {
            var hosts = _hostService.GetHosts();

            return(View(new IndexViewData {
                Hosts = hosts.Select(h => new HostDto {
                    Id = h.Id, Name = h.Name
                })
            }));
        }
Example #2
0
 public IHttpActionResult GetHosts()
 {
     return(Ok(hostService.GetHosts()));
 }