public SqlField(ColumnDescriptor column) { Type = column.GetDbDataType(true); Name = column.MemberName; PhysicalName = column.ColumnName; CanBeNull = column.CanBeNull; IsPrimaryKey = column.IsPrimaryKey; PrimaryKeyOrder = column.PrimaryKeyOrder; IsIdentity = column.IsIdentity; IsInsertable = !column.SkipOnInsert; IsUpdatable = !column.SkipOnUpdate; SkipOnEntityFetch = column.SkipOnEntityFetch; CreateFormat = column.CreateFormat; CreateOrder = column.Order; ColumnDescriptor = column; }
internal SqlDataType(ColumnDescriptor column) : this(column.GetDbDataType(true)) { }
public static SqlValue GetSqlValueFromObject(this MappingSchema mappingSchema, ColumnDescriptor columnDescriptor, object obj) { var providerValue = columnDescriptor.GetProviderValue(obj); return(new SqlValue(columnDescriptor.GetDbDataType(true), providerValue)); }