public IEnumerable <SessionViewModel> Sessions(string username) { IEnumerable <SessionViewModel> sessions = _repo.ListAllSessions() .Where(s => s.IsVisible == true) .Select(s => new SessionViewModel() { DateCreated = s.DateCreated, SessionName = s.Name, Secured = !string.IsNullOrEmpty(s.HashedPassword), ConnectionExpiryInHours = s.ConnectionExpiryInHours, IsUserAuthorized = _service.IsUserAuthorized(username, s.Name), IsVisible = s.IsVisible, PersistHistory = s.PersistHistory }); return(sessions); }
public ActionResult Index() { return(View(_repo.ListAllSessions())); }