Aura.Msgr.Database.MsgrDb.RenameGroup C# (CSharp) Method

RenameGroup() public method

Renames group in database.
public RenameGroup ( Aura.Msgr.Database.User user, int groupId, string groupName ) : void
user Aura.Msgr.Database.User
groupId int
groupName string
return void
		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();
			}
		}