public PropertyExpression([NotNull] IProperty property) : base(Check.NotNull(property, "property").PropertyType) { Check.NotNull(property, "property"); PropertyName = property.ColumnName(); }
public ColumnModification( [NotNull] StateEntry stateEntry, [NotNull] IProperty property, [NotNull] ParameterNameGenerator parameterNameGenerator, bool isRead, bool isWrite, bool isKey, bool isCondition) { Check.NotNull(stateEntry, "stateEntry"); Check.NotNull(property, "property"); Check.NotNull(parameterNameGenerator, "parameterNameGenerator"); _stateEntry = stateEntry; _property = property; _columnName = property.ColumnName(); _parameterName = isWrite ? new LazyRef <string>(parameterNameGenerator.GenerateNext) : new LazyRef <string>((string)null); _originalParameterName = isCondition ? new LazyRef <string>(parameterNameGenerator.GenerateNext) : new LazyRef <string>((string)null); _outputParameterName = isRead ? new LazyRef <string>(parameterNameGenerator.GenerateNext) : new LazyRef <string>((string)null); _isRead = isRead; _isWrite = isWrite; _isKey = isKey; _isCondition = isCondition; }
public override string ToString() { var s = _tableAlias + "." + _property.ColumnName(); if (Alias != null) { s += " " + Alias; } return(s); }
private static Column BuildColumn(Table table, IProperty property) { var column = new Column(property.ColumnName(), property.PropertyType, property.ColumnType()) { IsNullable = property.IsNullable, DefaultValue = property.ColumnDefaultValue(), DefaultSql = property.ColumnDefaultSql(), ValueGenerationStrategy = property.ValueGenerationOnSave, IsTimestamp = property.PropertyType == typeof(byte[]) && property.IsConcurrencyToken }; table.AddColumn(column); return(column); }
public ColumnModification( [NotNull] StateEntry stateEntry, [NotNull] IProperty property, [CanBeNull] string parameterName, [CanBeNull] string originalParameterName, bool isRead, bool isWrite, bool isKey, bool isCondition) { Check.NotNull(stateEntry, "stateEntry"); Check.NotNull(property, "property"); _stateEntry = stateEntry; _property = property; _columnName = property.ColumnName(); _parameterName = parameterName; _originalParameterName = originalParameterName; _isRead = isRead; _isWrite = isWrite; _isKey = isKey; _isCondition = isCondition; }
private static Column BuildColumn(Table table, IProperty property) { var column = new Column(property.ColumnName(), property.PropertyType, property.ColumnType()) { IsNullable = property.IsNullable, DefaultValue = property.ColumnDefaultValue(), DefaultSql = property.ColumnDefaultSql(), ValueGenerationStrategy = property.ValueGenerationOnSave, IsTimestamp = property.PropertyType == typeof(byte[]) && property.IsConcurrencyToken }; table.AddColumn(column); return column; }