I am using Dapper to Update and Insert Access DB. Code is working not throwing exception but its not updating the value in DB. 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 hardcode the value than its updating in the DB. So probably its related to parameter.