コード例 #1
0
        public IActionResult DownloadFromSql(int id)
        {
            SqlRepository repo   = new SqlRepository();
            var           stream = repo.GetBinaryValue(id);
            //MemoryStream ms = new MemoryStream();
            //stream.CopyTo(ms);
            var contentType = "application/octet-stream";

            return((IActionResult) new CustomFileResult(stream, contentType));
        }