title: ServiceStack metadata page throws MemberAccessException: Cannot create an abstract class
body: <p>Let's say you have a request class AllCustomers that returns an IEnumerable</p>
  
  <pre><code>[Route("/customers")]
  public class AllCustomers : IReturn&lt;IEnumerable&lt;Customer&gt;&gt;
  {
  }
  </code></pre>
  
  <p>If you go to the metadata page for that request you will get the following crash:</p>
  
  <pre><code>[MemberAccessException: Cannot create an abstract class.]
  System.Runtime.Serialization.FormatterServices.nativeGetUninitializedObject(RuntimeType type) +0
  System.Runtime.Serialization.FormatterServices.GetUninitializedObject(Type type) +56
  ServiceStack.Text.&lt;&gt;c__DisplayClass3.&lt;GetConstructorMethodToCache&gt;b__1() +38
  ServiceStack.Text.ReflectionExtensions.CreateInstance(Type type) +64
  ServiceStack.WebHost.Endpoints.Metadata.JsonMetadataHandler.CreateMessage(Type dtoType) +49
  ServiceStack.WebHost.Endpoints.Metadata.BaseMetadataHandler.CreateResponse(Type type) +267
  ServiceStack.WebHost.Endpoints.Metadata.BaseMetadataHandler.ProcessOperations(HtmlTextWriter writer, IHttpRequest httpReq, IHttpResponse httpRes) +688
  ServiceStack.WebHost.Endpoints.Metadata.BaseMetadataHandler.Execute(HttpContext context) +267
  ServiceStack.WebHost.Endpoints.Support.HttpHandlerBase.ProcessRequest(HttpContext context) +84
  System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
  System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +69
  </code></pre>
  
  <p>I think the implementation of the metadata page should not crash when the response for a given request is an IEnumerable because this is a perfectly valid way to implement interfaces to your services (and its more preferable than returning a List). It should be smart enough to instantiate a List for the samples section if it sees IEnumerable as the return type. At least it shouldn't crash if the return type isn't instantiable...</p>