//Photos/AllPhotos public IActionResult AllPhotos() { //get the model List <Photo> photos = repository.GetPhotos(); //return the view with the model in it return(View(photos)); }
public void OnGet() { //get the model List <Photo> photos = repository.GetPhotos(); //return the view with the model in it Photos = photos; }
public List <Photos> GetPhotos() { MySqlConnection connection = connectionFactory.ConnectionCar; try { return(photosRepository.GetPhotos(connection)); } catch (Exception e) { connection.CancelQuery(100); throw e; } }
public async Task <IEnumerable <PhotoResource> > GetPhotos(int vehicleId) { var photos = await photosRepository.GetPhotos(vehicleId); return(mapper.Map <IEnumerable <Photo>, IEnumerable <PhotoResource> >(photos)); }