Open
Description
I am using v3.0.0 of the Csv output formatter. However, I saw the following issue:
[Route("a")]
[HttpGet]
[Produces("text/csv")]
public IEnumerable<A> GetA()
{
var b = new[]
{
new B { Item2 = "Hello" },
};
var result = b.Select(i => new A { Item1 = i.Item2 });
return result;
// If I replace the return with the following it works as expected:
// return result.ToList();
}
public class A
{
public string Item1 { get; set; }
}
private class B
{
public string Item2 { get; set; }
}
The result of this is:
Item2
Hello
when I would expect
Item1
Hello