ExecuteNonQuery() public method

public ExecuteNonQuery ( ) : void
return void
Exemplo n.º 1
0
        public void Remove()
        {
            var cmd = new SqlCommand("DELETE FROM rohbot.notifications WHERE devicetoken=:devicetoken AND userid=:userid");
            cmd["devicetoken"] = DeviceToken;
            cmd["userid"] = UserId;

            cmd.ExecuteNonQuery();
        }
Exemplo n.º 2
0
        public void Save()
        {
            var cmd = new SqlCommand("UPDATE rohbot.notifications SET regex=:regex WHERE id=:id");
            cmd["id"] = Id;
            cmd["regex"] = Regex.ToString();

            cmd.ExecuteNonQuery();
        }