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

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

關于EF導航屬性的問題

關于EF導航屬性的問題

長風秋雁 2018-08-07 07:10:51
剛開始學習EF,在閱讀別人代碼的時候看到導航屬性,網(wǎng)上沒有找到關于導航屬性的詳細說明,只知道是設置多表關聯(lián)的,代碼如下/// <summary>/// /// </summary>[XmlIgnoreAttribute()] [SoapIgnoreAttribute()] [DataMemberAttribute()] [EdmRelationshipNavigationPropertyAttribute("Gift163DBModel", "FK_PRODUCTT_REFERENCE_PRODUCTT", "ProductTypes1")]public EntityCollection<ProductTypes> ProductTypes1 {get{return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<ProductTypes>("Gift163DBModel.FK_PRODUCTT_REFERENCE_PRODUCTT", "ProductTypes1"); }set{if ((value != null)) { ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<ProductTypes>("Gift163DBModel.FK_PRODUCTT_REFERENCE_PRODUCTT", "ProductTypes1", value); } } }數(shù)據(jù)庫表中沒有ProductTypes1這個字段,請問這段代碼是EF自動生成的還是手寫的呢?調用代碼如下public ActionResult LeftTree() {var items = _ProductTypesBLL.Get().Where(a=>a.ProductTypes2.Name.Equals("按地域分")).Take(11);return View(items); }
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 755 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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