Chaos.Portal.Core.Data.PortalRepository.GroupDelete C# (CSharp) Method

GroupDelete() public method

public GroupDelete ( System.Guid guid, System.Guid userGuid ) : uint
guid System.Guid
userGuid System.Guid
return uint
        public uint GroupDelete(Guid guid, Guid userGuid)
        {
            var result = Gateway.ExecuteNonQuery("Group_Delete", new[]
                {
                    new MySqlParameter("Guid", guid.ToByteArray()),
                    new MySqlParameter("UserGuid", userGuid.ToByteArray())
                });

            if(result == -100) throw new InsufficientPermissionsException("User has insufficient permissions to delete groups");
            if(result == -200) throw new UnhandledException("Group_Delete had an unhandled exception and was rolled back");

            return (uint)result;
        }