The GetMediaFileDetailUrl transformation method can have two parameters (as you can see in our API reference). First is query string and second is FileID. You can therefore use it as follows (test is my FileID specified in Media gallery web part configuration)
<a href="<%# HTMLHelper.HTMLEncode(MediaLibraryFunctions.GetMediaFileDetailUrl("test",Eval("FileID"))) %>" title="<%# ResHelper.GetString(Convert.ToString(Eval("FileDescription"))) %>">