title: Net Core: Declare and Initialize new Enumerable in Moq statement
body: <p>I am trying to declare and initialize an empty IEnumerable in a Moq statement. For some reason the last part where I try to declare ProductResult as Enumerable is failing. Can i do this inline with Moq statement? </p>
  
  <pre><code>mock.Setup(b =&gt; b.GetProductStatus(It.IsAny&lt;bool&gt;())).Returns(new List&lt;ProductResult&gt;().AsEnumerable() { });
  </code></pre>
  
  <p>Trying to research this article:</p>
  
  <p><a href="https://stackoverflow.com/questions/4606407/ienumerableobject-a-new-ienumerableobject-can-i-do-this">IEnumerable&lt;object&gt; a = new IEnumerable&lt;object&gt;(); Can I do this?</a></p>