第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

方法無法轉(zhuǎn)換為商店表達式

方法無法轉(zhuǎn)換為商店表達式

C#
慕哥9229398 2019-08-12 18:47:36
方法無法轉(zhuǎn)換為商店表達式我看到這個代碼使用LINQ to SQL,但是當我使用Entity Framework時,它會拋出此錯誤:LINQ to Entities無法識別方法'System.Linq.IQueryable'1 [MyProject.Models.CommunityFeatures] GetCommunityFeatures()'方法,并且此方法無法轉(zhuǎn)換為商店表達式。存儲庫代碼是這樣的:public IQueryable<Models.Estate> GetEstates(){     return from e in entity.Estates            let AllCommFeat = GetCommunityFeatures()            let AllHomeFeat = GetHomeFeatures()            select new Models.Estate                       {                                 EstateId = e.EstateId,                                 AllHomeFeatures = new LazyList<HomeFeatures>(AllHomeFeat),                                 AllCommunityFeatures = new LazyList<CommunityFeatures>(AllCommFeat)                       };}public IQueryable<Models.CommunityFeatures> GetCommunityFeatures(){     return from f in entity.CommunityFeatures            select new CommunityFeatures                       {                           Name = f.CommunityFeature1,                           CommunityFeatureId = f.CommunityFeatureId                       };}public IQueryable<Models.HomeFeatures> GetHomeFeatures(){     return from f in entity.HomeFeatures            select new HomeFeatures()            {                Name = f.HomeFeature1,                HomeFeatureId = f.HomeFeatureId            };}LazyList是一個擴展IQueryable功能的List。有人能解釋為什么會出現(xiàn)這種錯誤嗎
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 349 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號