zoukankan      html  css  js  c++  java
  • The specified type member 'IsLock' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

    var query = from C in objDb.GetDb<A>()
    join a in objDb.GetDb<B>().Where(m => m.ComputerID != null)
    on C.Email equals a.Email
    select new C
    {
    };

    EF 执行错误:The specified type member 'IsLock' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

    原因:new 的时候要初始化大括号的属性值

    修改后

    GridDto<DownRegistrationDto> entityDb = new GridDto<DownRegistrationDto>();
    var query = from C in objDb.GetDb<a>()
    join a in objDb.GetDb<b>().Where(m => m.ComputerID != null)
    on C.Email equals a.Email
    select new C
    {

       DID = C.DID, ProductID =C.ProductID,ProductName =C.ProductName,FepVersion =C.FepVersion
    };

  • 相关阅读:
    [HDU6793] Tokitsukaze and Colorful Tree
    [NOI2020]命运
    [NOI2020]美食家
    模拟9
    晚测2
    模拟8
    联考4
    模拟7
    模拟6
    关于数论
  • 原文地址:https://www.cnblogs.com/wangguowen27/p/entity_navigation_properties_are_supported_MVC_net_EF.html
Copyright © 2011-2022 走看看