public ActionResult GetFile(string id) { if (string.IsNullOrEmpty(id)) { throw new Exception("file id is empty"); } var f = new Repository.FileRepository().Download(id); if (f != null) { return(File(f.File, "application/pdf")); } throw new Exception("file not found"); }
public void Setup() { DataSource = new Repository.FileRepository(); }