public SelectColumnBasedElement(ISelectColumn column, ICompositeKey primaryKey) { _Column = column ?? throw new ArgumentNullException(nameof(column)); PrimaryKey = primaryKey ?? throw new ArgumentNullException(nameof(primaryKey)); _ParameterName = null; }
public SelectColumnBasedElement(string parameterName, ICompositeKey primaryKey) { _ParameterName = parameterName ?? throw new ArgumentNullException(nameof(parameterName)); PrimaryKey = primaryKey ?? throw new ArgumentNullException(nameof(primaryKey)); _Column = null; }
internal static IQueryTable GetSingleMappingContext(ISelectColumn column) { var mappingContext = column.MappingContext .LastOrDefault(x => x != column.PrimaryKey.Table) ?? column.MappingContext.FirstOrDefault(); return(mappingContext ?? throw new InvalidOperationException($"You must have at least one mapping context: {column.Alias}.")); }
static string Alias(ISelectColumn c) => c.Alias;