public void RenameGroup(User user, int groupId, string groupName)
{
using (var conn = this.Connection)
using (var cmd = new UpdateCommand("UPDATE `groups` SET {0} WHERE `groupId` = @groupId AND `contactId` = @contactId", conn))
{
cmd.Set("name", groupName);
cmd.AddParameter("@groupId", groupId);
cmd.AddParameter("@contactId", user.Id);
cmd.Execute();
}
}