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); }
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); }
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>); }
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>; }