We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While trying to mix public and internal properties in a class Dapper doesn't map internal properties to parameters in the query.
How to reproduce it:
using IDbConnection connection = new SqlConnection("Server=.;Initial Catalog=TestDB;..."); connection.Open(); var testClass = new TestClass { ValueA01 = "Test", ValueA02 = 10 }; var result = connection.Execute("INSERT INTO TableA VALUES (@ValueA01, @ValueA02)", testClass); if(connection.State == ConnectionState.Open) { connection.Close(); } public class TestClass { public string ValueA01 { get; set; } = string.Empty; internal int ValueA02 { get; set; } }
Error message:
Microsoft.Data.SqlClient.SqlException (0x80131904): Must declare the scalar variable "@ValueA02"
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While trying to mix public and internal properties in a class Dapper doesn't map internal properties to parameters in the query.
How to reproduce it:
Error message:
The text was updated successfully, but these errors were encountered: