using Microsoft.AspNetCore.Mvc;
using Shride.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Shride.Components
{
    public class RideSearchResultsViewComponent : ViewComponent
    {
        private IRideRepository repository;

        public RideSearchResultsViewComponent(IRideRepository repo)
        {
            repository = repo;
        }

        public IViewComponentResult Invoke()
        {
            return View("RideSearchResults", repository.SearchRide());

        }
    }
}
