public async Task<IActionResult> Index(SearchViewModel searchVM)
		{
			string searchString = searchVM == null ? null : searchVM.SearchString;
			var carriers = await _carrierRepository.GetCarriersAsync(searchString);
			var model = new CarrierListViewModel(carriers);
			return View("Index", model);
		}
Ejemplo n.º 2
0
 public CarrierListViewModel(List<Carrier> carriers)
 {
     CarrierList = carriers;
     Carrier = new CarrierViewModel();
     Search = new SearchViewModel();
 }
 public CarrierListViewModel(List <Carrier> carriers)
 {
     CarrierList = carriers;
     Carrier     = new CarrierViewModel();
     Search      = new SearchViewModel();
 }