Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
358 B
2
Indexable
Never
public int DeleteByColumn(string tableName, string columnName, string value)
{
    var command = new SqlCommand
    {
        CommandType = CommandType.Text,
        CommandText = "delete from " + tableName + " where " + columnName + " = " + value + ";",
        Connection = _connector.GetConnection()
    };
    return command.ExecuteNonQuery();
}
Leave a Comment