錯誤CS0266無法隱式轉換類型「Vidly.Models.HotelInformation」到「System.Collections.Generic.IEnumerable < Vidly.Models.HotelInformation> 」。存在明確的轉換(您是否缺少演員?)不能含蓄對象的類型轉換爲system.collection.generic.IEnumerable
我在運行我的應用程序時收到此錯誤。我已經寫
Hotel = new HotelInformation()
(其中我收到錯誤)
在我的視圖模型我寫
public IEnumerable<HotelInformation> Hotel { get; set; }
我看其他的解決方案,但他們似乎並沒有上班。
「當運行我的應用程序時,我寫了」 - 它不會回答它。 MVC不僅存在於一項技術中。 – Zydnar