У меня есть следующий код, который производит изображение. Но я получаю сообщение об ошибке.
Мой код:
public ActionResult Index()
{
eCommerceEntities db = new eCommerceEntities();
var orders = (from c in db.Orders
group c by c.PaymentTypeID into g
select new { PaymentTypeID = g.Key, Number = g.Count() });
var bytes = new Chart(width: 600, height: 400)
.AddTitle("Orders")
.DataBindTable(dataSource: orders, xField: "PaymentTypeID")
.GetBytes("png");
return File(bytes, "image/png");
}
Сообщение об ошибке:
Specified method is not supported.
Трассировка стека:
![enter image description here](https://i.stack.imgur.com/yIW6H.png)
Спасибо заранее.