Example #1
0
        public void AddAlbum(AlbumDTO newAblum)
        {
            Album album = new Album {
                Title  = newAblum.Title,
                Photos = newAblum.Photos
            };

            _repo.Add <Album>(album);
            _repo.SaveChanges();

            //return Mapper.Map<AlbumDTO>(album);
        }
Example #2
0
        public void AddAlbum(AlbumDTO newAblum)
        {
            Album album = new Album {
                Title = newAblum.Title,
                Photos = newAblum.Photos
            };

            _repo.Add<Album>(album);
            _repo.SaveChanges();

            //return Mapper.Map<AlbumDTO>(album);
        }
Example #3
0
 public IList <PhotoDTO> ListPhotos(AlbumDTO album)
 {
     return((from a in _repo.Query <Album>().Include(a => a.Photos)
             where a.Title == album.Title
             select a) as IList <PhotoDTO>);
 }
Example #4
0
 public IList<PhotoDTO> ListPhotos(AlbumDTO album)
 {
     return (from a in _repo.Query<Album>().Include(a => a.Photos)
      where a.Title == album.Title
      select a) as IList<PhotoDTO>;
 }