title: How to download MP3 files with ASP.NET MVC 5 & Entity Framework
body: <p>I have successfully done the upload bit - uploaded the MP3 files to my SQL Server, but I need help in downloading the files.... I use the following code to upload the MP3 file</p>
  
  <pre><code>public ActionResult Create([Bind(Include = "ID,Artist,Album")] TrackUpload trackUpload, HttpPostedFileBase upload)
  {
      try
      {
          if (ModelState.IsValid)
          {
              if (upload != null &amp;&amp; upload.ContentLength &gt; 0)
              {
                  var song = new File
                  {
                      FileName = System.IO.Path.GetFileName(upload.FileName),
                      FileType = FileType.Songs,
                      ContentType = upload.ContentType
                  };
                  using (var reader = new System.IO.BinaryReader(upload.InputStream))
                  {
                      song.Content = reader.ReadBytes(upload.ContentLength);
                  }
                  trackUpload.Files = new List&lt;File&gt; { song };
              }
              db.TrackUploads.Add(trackUpload);
              db.SaveChanges();
              return RedirectToAction("Index");
          }
      }
  
      catch (RetryLimitExceededException /* dex */)
      {
  
          ModelState.AddModelError("", "Cant save changes.");
      }
      return View(trackUpload);
  }
  </code></pre>
  
  <p><strong>It is working fine which meaning the file stores in Database, Now how do i download the MP3 file from sql db using entity framework</strong></p>