Пример #1
0
 /// <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));
 }
Пример #2
0
 /// <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}]";
Пример #3
0
 /// <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";
Пример #4
0
 /// <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;