title: How to handle a list of byte array in asp.net web api
body: <p>I'm currently designing a web api to return a list of documents. </p>
  
  <pre><code>public class Document : IIdentifier&lt;int&gt; {
  
      public Document() { }
  
      public int ID { get; set; }
      public string Title { get; set; }
      public string AddDate { get; set; }
      public byte[] File { get; set; }
  }
  </code></pre>
  
  <p>It can be a list of 1000 documents. Some of the files are about 36 MB each. </p>
  
  <p><strong>Performance wise, is it a good idea to return a list of byte[] of this size?</strong>  </p>
  
  <p>I was thinking converting the <strong>byte[] to Base64String</strong></p>
  
  <pre><code>    public static string ReadFile(string path) {      
          var doc = File.ReadAllBytes(path);
          return Convert.ToBase64String(doc);
      }
  </code></pre>
  
  <p>But the size is still very large. </p>