I am using Dapper.NET and when i execute the next code:
using (SqlConnection con = new SqlConnection(connectionString))
{
con.Open();
con.Execute(@" insert Clients(name) values(@Name)", new {Name = "John"});
con.Close();
}
The query that it executes is the next one:
(@Name nvarchar(4000)) insert Clients(name) values(@Name)
And my question is: why is Dapper translating a string to a nvarchar(4000)? I mean... on the database, the name field is a nvarchar(50)...
Does anybody face this bug? How do you fix it? Have you found another bug like this?