Skip to content
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

查询时枚举转 int再转字符串报错 referenced from scope '', but it is not defined #1781

Open
NKidding opened this issue Apr 15, 2024 · 1 comment

Comments

@NKidding
Copy link

[Fact]
public async Task Test2()
{
    var freeSql = provider.GetService<IFreeSql>();
    var model = await  freeSql.Select<TestEntity1>().FirstAsync(s => new
    {
        State = ((int)s.State).ToString()
    });
}

public class TestEntity1
{
    [Column(Name = "id", IsIdentity = true, IsPrimary = true)]
    public int Id { get; set; }

    public TestState State { get; set; }
}

FreeSql版本 :3.2.821(最新几个版本试了都有这个问题 3.2.6n没问题)

数据库:Postgres 14

@2881099
Copy link
Collaborator

2881099 commented Apr 17, 2024

已处理,留意

2881099 added a commit that referenced this issue May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants