public IActionResult Create() { var cities = _cityService.GetAll(); var carriers = _carrierService.GetAll(); var paymentCategory = _paymentCategoryService.GetAll(); var vehicles = _vehicleService.GetAll(); var model = new DepartureInputModel { Cities = cities, Carriers = carriers, PaymentCategories = paymentCategory, Vehicles = vehicles }; return(View(model)); }
public IActionResult Index() { var carriers = _carrierService.GetAll(); var carriersListing = carriers.Select(c => new CarrierDetailModel { Id = c.Id, Name = c.Name, Vehicles = c.Vehicles, Address = c.Address, Contacts = FrontHelpers.FrontHumanizeHelper.ContactsHumanize(c.Contacts) }); var model = new CarrierIndexModel { Carriers = carriersListing }; return(View(model)); }