Exemplo n.º 1
0
        public async Task <IActionResult> Index()
        {
            bool isAuthenticated = User.Identity.IsAuthenticated;

            if (isAuthenticated)
            {
                var employees = _context.Employee.Where(s => s.ownerID == HttpContext.Session.GetObjectFromJson <int>("ownerID"));

                return(View(EmployeeMapper.MapEmployeesListToView(employees, _context)));
            }
            return(RedirectToAction("Login", "Account", new { area = "" }));
        }