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)); }
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)); }