/// <summary> /// Loads the Property Settings. /// This method is called from the base classes constructor. /// </summary> public override void Initialize() { #region Base Properties KeyName = PropertySource.Name; //Description = PropertySource.Description; #region Data Type Related SystemType = TypeHelper.ResolveSystemType(PropertySource.SystemType(), PropertySource.AllowDBNull, true); //DefaultValue = PropertySource.DefaultValue; Size = PropertySource.Size; Scale = PropertySource.Scale; Precision = PropertySource.Precision; //FixedLength = //Unicode = IsNullable = PropertySource.AllowDBNull; #endregion #endregion #region Column Specific Properties DataType = PropertySource.DataType; NativeType = PropertySource.NativeType; //IsUnique = PropertySource.IsUnique; //IsForeignKey = PropertySource.IsForeignKeyMember; IsRowVersion = PropertySource.IsColumnRowVersion(); IsIdentity = PropertySource.IsColumnIdentity(); IsComputed = PropertySource.IsColumnComputed(); Unicode = PropertySource.IsUnicode(); FixedLength = PropertySource.IsFixedLength(); // Views do not define any keys, but in cases where frameworks need to define a key like entity framework a key is defined as any non-nullable column. if (Configuration.Instance.GenerateViewKeys) { IsPrimaryKey = !IsNullable && !FixedLength; } PropertyType = ResolvePropertyType(); #endregion }
/// <summary> /// Loads the Property Settings. /// This method is called from the base classes constructor. /// </summary> public override void Initialize() { #region Base Properties KeyName = PropertySource.Name; Description = PropertySource.Description; #region Data Type Related SystemType = TypeHelper.ResolveSystemType(PropertySource.SystemType(), PropertySource.AllowDBNull, true); //DefaultValue = PropertySource.DefaultValue; Size = PropertySource.Size; Scale = PropertySource.Scale; Precision = PropertySource.Precision; //FixedLength = //Unicode = IsNullable = PropertySource.AllowDBNull; #endregion #endregion #region Column Specific Properties DataType = PropertySource.DataType; ExtendedProperties["DataType"] = PropertySource.NativeType; NativeType = PropertySource.NativeType; ExtendedProperties["NativeType"] = PropertySource.NativeType; //IsUnique = PropertySource.IsUnique; //IsPrimaryKey = PropertySource.IsPrimaryKeyMember; //IsForeignKey = PropertySource.IsForeignKeyMember; IsRowVersion = PropertySource.IsColumnRowVersion(); IsIdentity = PropertySource.IsColumnIdentity(); IsComputed = PropertySource.IsColumnComputed(); Unicode = PropertySource.IsUnicode(); FixedLength = PropertySource.IsFixedLength(); PropertyType = ResolvePropertyType(); #endregion }
/// <summary> /// Loads the Property Settings. /// This method is called from the base classes constructor. /// </summary> public override void Initialize() { #region Base Properties KeyName = PropertySource.Name.Replace("@", String.Empty); // NOTE: This can take forever in some cases on long stored procedures. //Description = PropertySource.Description; #region Data Type Related SystemType = TypeHelper.ResolveSystemType(PropertySource.SystemType(), PropertySource.AllowDBNull, true); //DefaultValue = PropertySource.DefaultValue; Size = PropertySource.Size; Scale = PropertySource.Scale; Precision = PropertySource.Precision; IsNullable = PropertySource.AllowDBNull; #endregion #endregion #region Column Specific Properties DataType = PropertySource.DataType; NativeType = PropertySource.NativeType; //IsUnique = PropertySource.IsUnique; //IsPrimaryKey = PropertySource.IsPrimaryKeyMember; //IsForeignKey = PropertySource.IsForeignKeyMember; IsRowVersion = PropertySource.IsColumnRowVersion(); //IsIdentity = PropertySource.IsColumnIdentity(); // NOTE: This is not needed for a command paramater... IsComputed = IsRowVersion; // PropertySource.IsColumnComputed(); Unicode = PropertySource.IsUnicode(); FixedLength = PropertySource.IsFixedLength(); #endregion ParameterDirection = PropertySource.Direction; PropertyType = ResolvePropertyType(); }