コード例 #1
0
        public IActionResult ViewBuyerProfile(int id)
        {
            _logger.LogCritical(1002, "Getting item {ID}", id);
            Buyer buyer = _BuyerRepo.GetBuyerById(id);
            ViewUserProfileViewModel viewUserProfileViewModel = new ViewUserProfileViewModel
            {
                CurrentBuyer = buyer
            };

            return(View(viewUserProfileViewModel));
        }
コード例 #2
0
        public async Task <IActionResult> ViewDevProfile(int id)
        {
            //_logger.LogCritical(1002, "Getting item {ID}", id);
            var currentUser = (Developer)await _userManager.GetUserAsync(User);

            Developer dev = _DevRepo.GetDevById(id);
            ViewUserProfileViewModel viewUserProfileViewModel = new ViewUserProfileViewModel
            {
                CurrentDev            = currentUser,
                ViewingDev            = dev,
                NumProjWrkOn          = _DevRepo.GetNumProjWrkOnById(id),
                Credit                = _DevRepo.GetCreditById(id),
                ProjsWithIfDevIsRated = _ReviewRepo.GetProjsWithIfDevIsRated(currentUser.Id, dev.Id)
            };

            return(View(viewUserProfileViewModel));
        }