Ejemplo n.º 1
0
        public void OnGet()
        {
            _beerCollectionservice = new beerCollectionService(_beerCollectionRepository);
            _friendService         = new friendService(_friendRespository, _userRepository);

            var userId = User.FindFirst(ClaimTypes.NameIdentifier).Value;

            userCollectionCount          = _beerCollectionservice.getUserCollectionCount(userId);
            userCollectionRemainingCount = _beerCollectionservice.getUserCollectionRemaningCount(userId);
            userFriendId = _friendService.getUserFriendId(userId);
        }
Ejemplo n.º 2
0
        public void OnGet()
        {
            setPageVariables();
            service = new beerCollectionService(_beerCollectionRepository);
            var userId = User.FindFirst(ClaimTypes.NameIdentifier).Value;

            if (type.Equals("tried"))
            {
                beers = service.getUserCollection(userId);
            }
            else
            {
                beers = service.getUserCollectionRemaining(userId);
            }
        }