Exemplo n.º 1
0
        public ActionResult Index()
        {
            var appointments         = _repository.SelectAll().ToList();
            var appointmentViewModel = Mapper.Map <List <AppointmentViewModel> >(appointments);

            if (LoginUserSession.Current != null)
            {
                return(View(appointmentViewModel));
            }
            return(Redirect("/Users/Login"));
        }