错误107无法将类型'System.Collections.Generic.List'隐式转换为'System.Collections.Generic.IEnumerable'。存在显式转换(您是否错过了演员?)
enter code here
public IEnumerable<TempProductCart> Get()
{
IEnumerable<TempProductCart> q = rep.Get();
var a= q.Select(x => new
{
x.Product.Name,
x.ProductID,
x.User.Username,
x.ProductQty
}).ToList();
return a;
}