然后包括在.NET核心中不起作用的条件

编程入门 行业动态 更新时间:2024-10-24 22:22:02
本文介绍了然后包括在.NET核心中不起作用的条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

var cert = _context.Certificates .Include(c => c.Staff) .ThenInclude(c => c.Department.Abbr.Contains("cs")) .Where(c => (int)c.CertificateType == 1) .AsNoTracking();

ThenInclude给出错误,因为表达式应代表核心中的访问属性。 什么我试过了: 上面的代码没有给出语法错误。但是在运行它时不起作用。

ThenInclude gives error as the expression should represent a property for access in core. What I have tried: The above code does not give syntax error. But while running it does not work.

推荐答案

如果你不知道的话,你应该把Google错误消息给你... 它你似乎只是在这里遇到一个已知问题: 支持过滤包含·问题#1833·aspnet / EntityFrameworkCore ·GitHub [ ^ ] You should Google you error message whenever it is not know for you... It seems you just hit a known issue here: Support filtered Include · Issue #1833 · aspnet/EntityFrameworkCore · GitHub[^]

更多推荐

然后包括在.NET核心中不起作用的条件

本文发布于:2023-11-16 10:09:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1603331.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:中不   核心   条件   NET

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!