Beispiel #1
0
        // GET: Worker
        public ActionResult Index()
        {
            ApplicationUser      user        = db.FindUser(User.Identity.GetUserId());
            WorkerIndexViewModel workerIndex = new WorkerIndexViewModel()
            {
                Events         = db.GetEvents(user.Id).Select(e => CalenderViewModel.MapCalenderToCalenderViewModel(e)),
                Information    = db.GetInformation(user.Id).Select(i => InformationViewModel.MapInformation(i)),
                DepartmentName = user.GetDepartmentName()
            };

            return(View(workerIndex));
        }