Ejemplo n.º 1
0
        //GET: VehicleService/Search
        public async Task <IActionResult> Search(string query, int?page)
        {
            var vehicleServiceList = await _db.GetSearchServices(query, page);

            var result = vehicleServiceList.Count();

            if (result == 0)
            {
                var serviceList = await _db.GetAllServices(page);

                return(View("Index", serviceList));
            }

            return(View("Index", vehicleServiceList));
        }