public ActionResult Index() { var dbModel = _vehicleBusiness.GetAll(); var model = Mapper.Map <List <VehicleModel>, List <VehicleViewModel> >(dbModel); return(View("VehiclesList", model)); }
public ActionResult <IEnumerable <Vehicle> > GetAll() { try { IEnumerable <Vehicle> vehicles = _vehicleBusiness.GetAll(); return(Ok(vehicles)); } catch (Exception e) { return(StatusCode(500, e.Message)); } }
public ActionResult<IEnumerable<Vehicle>> List() { return _vehicleBusiness.GetAll().ToList(); }
public async Task <IActionResult> GetAll() { return(Ok(await _vehicleBusiness.GetAll())); }