// GET: ShuttleManagement public ActionResult Index() { GetRole(); var allShuttleInfo = repo.GetAllShuttleInfo(); List <ShuttleManagementInfoModel> managementList = new List <ShuttleManagementInfoModel>(); foreach (var item in allShuttleInfo) { managementList.Add(new ShuttleManagementInfoModel { ShuttleId = item.shuttle_id, Time = item.time.ToString(), StartLocation = item.start_location, EndLocation = item.end_location, Weekdays = item.weekday }); } return(View(managementList)); }