public ActionResult <IEnumerable <ReviewReadDto> > GetAllReviews() { var reviewItems = _repository.GetAllReviews(); var user = _userManager.GetUserAsync(User); return(Ok(_mapper.Map <IEnumerable <ReviewReadDto> >(reviewItems))); }
// Question 1 public int GetNumberOfReviewsFromReviewer(int reviewer) { int result = reviewRepo.GetAllReviews().Count(r => r.Reviewer == reviewer); return(result); }
public xUnitTest() { repo = new ReviewRepo(); repo.InitializeData(); repo.GetAllReviews(); }
public ActionResult <IEnumerable <Review> > GetAllReviews() { var reviewItems = reviewRepo.GetAllReviews(); return(Ok(mapper.Map <IEnumerable <ReviewReadDto> >(reviewItems))); }
public ActionResult Index() { return(View(_repo.GetAllReviews().OrderByDescending(r => r.ReviewDate).ToList())); }
public ViewResult AllReviews() { return(View(reviewRepo.GetAllReviews().ToList())); }
public static void addJson(TestContext tc) { repo = new ReviewRepo(); repo.InitializeData(); repo.GetAllReviews(); }
//here---------------------------------------------------------------------------------- public ActionResult ReviewPanel() { return(View(reviewRepo.GetAllReviews().ToList())); }
public ActionResult Index() { return(View(_repo.GetAllReviews().OrderByDescending(r => r.Rating))); }