Exemple #1
0
        public ActionResult <IEnumerable <ReviewReadDto> > GetAllReviews()
        {
            var reviewItems = _repository.GetAllReviews();
            var user        = _userManager.GetUserAsync(User);

            return(Ok(_mapper.Map <IEnumerable <ReviewReadDto> >(reviewItems)));
        }
Exemple #2
0
        // 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)));
        }
Exemple #5
0
 public ActionResult Index()
 {
     return(View(_repo.GetAllReviews().OrderByDescending(r => r.ReviewDate).ToList()));
 }
 public ViewResult AllReviews()
 {
     return(View(reviewRepo.GetAllReviews().ToList()));
 }
Exemple #7
0
 public static void addJson(TestContext tc)
 {
     repo = new ReviewRepo();
     repo.InitializeData();
     repo.GetAllReviews();
 }
Exemple #8
0
 //here----------------------------------------------------------------------------------
 public ActionResult ReviewPanel()
 {
     return(View(reviewRepo.GetAllReviews().ToList()));
 }
Exemple #9
0
 public ActionResult Index()
 {
     return(View(_repo.GetAllReviews().OrderByDescending(r => r.Rating)));
 }