title: Map from HttpPostedFileBase to Byte[] with automapper
body: <p>Im trying to upload a picture and use automapper to convert it from HttpPostedFileBase to Byte[]. This is my CreateMap:</p>
  
  <pre><code>            Mapper.CreateMap&lt;HttpPostedFileBase, Byte[]&gt;()
              .ForMember(d =&gt; d, opt =&gt; opt.MapFrom(s =&gt; 
                  {
                      MemoryStream target = new MemoryStream();
                      s.InputStream.CopyTo(target);
                      return target.ToArray();
                  }));
  </code></pre>
  
  <p>I get an error on s : A lambda expression with a statement body cannot be converted to an expression tree.</p>
  
  <p>So how should i write my CreateMap to get this to work?</p>