/// <summary> /// Copies the property. /// </summary> /// <param name="prop">The property.</param> public void CopyProperty(IIDProperty prop) { if (prop is null) { return; } IDProperties.Add(prop.Convert <TClassType>(this)); }
/// <summary> /// Gets the name of the parent column. /// </summary> /// <param name="childMapping">The child mapping.</param> /// <param name="iDProperty">The i d property.</param> /// <param name="suffix">The suffix.</param> /// <returns>The parent column name</returns> protected string GetParentColumnName(IMapping childMapping, IIDProperty iDProperty, string suffix = "") => $"{GetTableName(childMapping, suffix)}.[{iDProperty?.ParentMapping.TableName}{iDProperty?.ColumnName}]";
/// <summary> /// Gets the name of the parent parameter. /// </summary> /// <param name="iDProperty">The i d property.</param> /// <returns>The parent parameter name</returns> protected string GetParentParameterName(IIDProperty iDProperty) => $"@{iDProperty?.ParentMapping.TableName}{iDProperty?.Name}_Temp";
/// <summary> /// Gets the type of the parameter. /// </summary> /// <param name="iDProperty">The i d property.</param> /// <returns>The parameter type name</returns> protected string GetParameterType(IIDProperty iDProperty) => iDProperty?.PropertyType.To(SqlDbType.Int).ToString().ToUpper(CultureInfo.InvariantCulture) ?? string.Empty;