このクエリがあります
List<int> AuctionIds =
(from a in _auctionContext.Auctions
where a.AuctionEventId == auction.AuctionEventId
select new { a.Id }).ToList();
しかし、コンパイルエラーが発生します
Cannot implicitly convert type 'System.Collections.Generic.List<AnonymousType#1>' to 'System.Collections.Generic.List<int>'
AuctionIds はどのタイプにする必要がありますか?
編集
AuctionIds フィールドは実際には別のクラス (モデル クラス) にあるため、単に var を使用することはできません。Jon Skeet がこれに答えていないなんて信じられない。