Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在easyquery中添加带有登录用户ID的自定义where条件?这是一个 MVC3 网络应用程序。我需要防止用户只看到那里的数据。
易查询
使用 BuildSQLEx() 方法。
例子:
SqlQueryBuilder builder = new SqlQueryBuilder((DbQuery)query); builder.BuildSQLEx("", "users.user_id=" + loggedUser.id); string sql = builder.Result.SQL;