/// <summary> /// Initializes a new instance of the <see cref="ModelSematicScalarType"/> class. /// </summary> /// <param name="src">the source</param> public ModelSematicScalarType(ModelSematicScalarType src) { if ((object)src != null) { this.SystemDataType = src.SystemDataType; this.Name = src.Name; this.MaxLength = src.MaxLength; this.Scale = src.Scale; this.Precision = src.Precision; this.CollationName = src.CollationName; this.IsNullable = src.IsNullable; } }
public ModelScalarType SuggestType(MetaModelBuilder metaModelBuilder) { //ModelTypeScalar scalarType = this.Type?.GetScalarType(); ModelSematicScalarType scalarType = this.SqlType.GetScalarType(); var result = new ModelScalarType { Name = scalarType.Name.GetQFullName("[", 2), ExternalName = scalarType.GetCondensed(), MaxLength = this.MaxLength, Scale = this.Scale, Precision = this.Precision, Nullable = this.Nullable, Type = scalarType.GetClrType() }; return(result); }
/// <summary> /// Initializes a new instance of the <see cref="ModelSematicValueScalar"/> class. /// </summary> /// <param name="type">the type</param> /// <param name="value">the value</param> /// <param name="isConst">const</param> public ModelSematicValueScalar(ModelSematicScalarType type, object value, bool isConst) { this.Type = type; this.Value = value; this.IsConst = isConst; }