/// <summary> /// Get the Nexus key for a MDM entity /// </summary> /// <param name="entity">Entity to use</param> /// <returns></returns> public static string ToMdmKeyString(this IMdmEntity entity) { var nexusId = entity.ToMdmId(); return(nexusId.ToIdentifier()); }
/// <summary> /// Get the Nexus MDM key for a MDM entity /// </summary> /// <param name="entity">Entity to use</param> /// <param name="defaultValue"></param> /// <returns>Value of the entity's MDM Id if present, default value (0) otherwise.</returns> public static int ToMdmKey(this IMdmEntity entity, int defaultValue = 0) { var nexusId = entity.ToMdmId(); return(nexusId.ToKey(defaultValue)); }