I am using Dapper to update and insert an access database. The code works without causing an exception, but without updating the value in the database. Below is my code
sql.Append("UPDATE drugs_repository SET drug_name = @DrugName "); sql.Append(" WHERE id = @DrugId"); var parameters = new { DrugName = objDrug.DrugName, DrugId = objDrug.DrugId }; var t = connection.Query<string>(sql.ToString(), parameters);
Can someone please let me know what exactly I am missing in the above code? When I rigidly set the value, than updating it in the database. This is probably due to the parameter.
c # ms-access dapper
techknackblogs
source share