Exemple #1
0
        public IActionResult Index()
        {
            var skillViewModel = _mapperSkill.MapAll();

            ViewBag.IsAuthenticated = AuthenticationLogic.IsAuthenticated;
            ViewBag.CurrentUser     = AuthenticationLogic.CurrentUserId;
            _auth.SetAuthentication(AuthenticationLogic.IsAuthenticated);

            return(View(skillViewModel));
        }
Exemple #2
0
        public IEnumerable <UserDataViewModel> GetAllUsersData()
        {
            var userDatas  = _mapUser.MapAll();
            int emailCount = 0;
            int passCount  = 0;

            foreach (var item in userDatas)
            {
                item.Email    = _authData.GetAll().Select(x => x.Email).Skip(emailCount).Take(++emailCount).First();
                item.Password = _authData.GetAll().Select(x => x.Password).Skip(passCount).Take(++passCount).First();
            }

            return(userDatas);
        }