以下這樣做法太麻煩了
public IQueryable
{
IQueryable
result = (from o in Context.Company
orderby o.Sort ascending
select new
{
CodeName = o.CodeName,
CodeValue = o.CodeValue,
}
).ToList()
.Select(x => new Company
{
CodeName = x.CodeName,
CodeValue = x.CodeValue,
}).AsQueryable();
return result;
}
{System.Linq.Enumerable+WhereSelectListIterator`2[<>f__AnonymousType0`2[System.String,System.String],Dcn.SqlClient.Company]}
沒有留言:
張貼留言