-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IEnumerable.GetEnumerator 是否有实现计划 #948
Comments
近期也在尝试这个,发现 ISelect 设计上的问题,有些进行不下去。用起来会和正常的 IQueryable 有些区别。 例如: IFreeSql freeSql = new FreeSqlBuilder()
.UseConnectionString(DataType.Sqlite, "Data Source=:memory:;")
.UseAutoSyncStructure(true)
.Build();
freeSql.Aop.CurdBefore += (s, e) =>
{
e.Sql.Dump();
};
var sel = freeSql.Select<Student>();
sel.Where(t=>t.Id == 1).ToList();
sel.Where(t=>t.Id == 2).ToList(); 期望结果: -- sel.Where(t=>t.Id == 1).ToList();
SELECT a."Id", a."Name"
FROM "Student" a
WHERE (a."Id" = 1)
-- sel.Where(t=>t.Id == 2).ToList();
SELECT a."Id", a."Name"
FROM "Student" a
WHERE (a."Id" = 2) 实际: -- sel.Where(t=>t.Id == 1).ToList();
SELECT a."Id", a."Name"
FROM "Student" a
WHERE (a."Id" = 1)
-- sel.Where(t=>t.Id == 2).ToList();
SELECT a."Id", a."Name"
FROM "Student" a
WHERE (a."Id" = 1) AND (a."Id" = 2) |
Where会修改前面的值。 |
是的,我是在研究如何用 System.Linq.Dynamic.Core,但是因为这个问题暂时也搁置了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature 特性
Extensions/FreeSql.Extensions.Linq/QueryableProvider.cs 中
IEnumerable.GetEnumerator 尚未实现,使得IEnumerable接口的实现实际不可用
简要描述原因
IEnumerable接口的实现实际不可用
使用场景
在ASP.NET等场景中,试图用FreeSql替换EntityFramework会需要用到这类接口的实现
The text was updated successfully, but these errors were encountered: