예제 #1
0
        public List<Photo> GetAllPhotos()
        {
            var repository = new PhotoRepository();
            var photoList = new List<Photo>();

            repository.GetAllPhotos().ForEach(x => photoList.Add(new Photo() { ID = x.ID, Description = x.Description }));

            return photoList;
        }
예제 #2
0
        public IActionResult Index()
        {
            var pics = repository.GetAllPhotos();

            return(View(pics));
        }
예제 #3
0
 public ActionResult Index()
 {
     return(View(PhotoRepository.GetAllPhotos()));
 }