public SongAlbum Post(SongAlbumDTO value) { SongAlbum model = new SongAlbum() { SongId = value.SongId, AlbumId = value.AlbumId }; return(ISongAlbumsRepository.Create(model)); }
public SongAlbum Put(int id, SongAlbumDTO value) { SongAlbum model = ISongAlbumsRepository.Get(id); if (value.SongId != 0) { model.SongId = value.SongId; } if (value.AlbumId != 0) { model.AlbumId = value.AlbumId; } return(ISongAlbumsRepository.Update(model)); }