我正在尝试使用 MVC 制作可下载的曲目。这是我的代码:
public ActionResult DownloadTrack(int albumid, int trackid)
{
var track = (from x in database.songs
where x.ALBUM_ID == albumid &&
x.TRACK_ID == trackid
select x).First();
Byte[] Song = track.MP3;
return File(Song, ".mp3", "test");
}
当代码到达 Byte[] Song 它说 track.MP3 = null 但是当我查询我的数据库时它说它已满......