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

DAP037 error when return type is an array #123

Closed
Jure-BB opened this issue Jul 31, 2024 · 0 comments · Fixed by #125
Closed

DAP037 error when return type is an array #123

Jure-BB opened this issue Jul 31, 2024 · 0 comments · Fixed by #125
Assignees

Comments

@Jure-BB
Copy link

Jure-BB commented Jul 31, 2024

Hello,

for ExecuteScalar and QuerySingleOrDefault methods DAP037 error is reported ("No settable members exist for user type"), when return type is an array like byte[] or string[].

public async Task<byte[]?> TryGetByteArray(NpgsqlConnection conn, long id)
{
    var bytes = await conn.ExecuteScalarAsync<byte[]>(
        "select blob from foo where id = @id",
        param: new { id });
    return bytes;
}

Expected behavior: No error.

  • Dapper v2.1.35
  • Dapper.AOT v1.0.31
  • Npgsql v8.0.3
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

Successfully merging a pull request may close this issue.

2 participants