如何使用dbContext在动态表上检查动态条件

发布于 2025-01-30 08:16:45 字数 207 浏览 2 评论 0原文

我在项目中对所有这些都是新手的,我在.NET Core 5和Dotnet Framework 5.0.17

现在使用DBContext和通用存储库,现在我要做的就是在SQL Server中以字符串格式存储一个条件

员工== 2

在我看来, 我陷入第一步的找到解决方案 任何提示或解决方案都将不胜感激。

I'm new To all Of this in my project i use dbcontext and generic Repository along .Net core 5 and dotnet frameWork 5.0.17

now here what I'm traying to do is Store a Condition in string format in sql server like

Employee.Id==2

in my mind 1st of all I must retrieve Employee then with help of predicate apply condition in where clause
and I'm stuck in find solution for 1st step
any hint or solution is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文