I have two tables: Album(AlbumId, AlbumName)
and Photo(PhotoId, PhotoName, AlbumId)
I have :
select top 1 Photo.PhotoId
from Photo
where Album.AlbumId=Photo.AlbumId
order by NEWID()
This is return one record random
I want convert it to Linq to sql
. I tried but not success.