I want to implement a simple delete button for my database. The event method looks something like this:
private void btnDeleteUser_Click(object sender, Event
I would use this:
public static class DbExtensions
{
public static void AddParameter(SQLiteCommand command, string name, DbType type, object value)
{
var param = new SQLiteParameter(name, type);
param.Value = value;
command.Parameters.Add(param);
}
}
Then, call this:
DbExtensions.AddParameter(command, "@" + fieldOfSearch[i], DbType.String, value[i]);