在Asp.Net Mvc中从数据库下载文件

我将我的文件存储在数据库中,需要在单击按钮时下载文件。
我可以在动作方法中获取文件内容(二进制)。 但是如何将其作为文件返回给用户?

<%= Html.ActionLink("download file", "download") %> 

在你的行动中:

 public ActionResult Download() { byte[] contents = GetFileContentsFromDatabase(); return File(contents, "image/jpeg") } 
 return new FileContentResult(byte[], contentType)