/// <summary> /// Adds a column to the key for this subclass, if used /// in a table-per-subclass strategy. /// </summary> /// <param name="column">Column name</param> public void KeyColumn(string column) { KeyMapping key; if (attributes.IsSpecified("Key")) { key = attributes.GetOrDefault <KeyMapping>("Key"); } else { key = new KeyMapping(); } key.AddColumn(Layer.UserSupplied, new ColumnMapping(column)); attributes.Set("Key", Layer.UserSupplied, key); }
/// <summary> /// Specify how the foreign key is configured. /// </summary> /// <param name="keyConfiguration">Configuration <see cref="Action"/></param> /// <returns>Builder</returns> public void Key(Action <KeyBuilder> keyConfiguration) { KeyMapping key; if (attributes.IsSpecified(x => x.Key)) { key = attributes.Get(x => x.Key); } else { key = new KeyMapping(); } keyConfiguration(new KeyBuilder(key)); attributes.Set(x => x.Key, key); }
public void KeyColumn(string column) { KeyMapping key; if (joinedSubclassAttributes.IsSpecified(x => x.Key)) { key = joinedSubclassAttributes.Get(x => x.Key); } else { key = new KeyMapping(); } key.AddColumn(new ColumnMapping { Name = column }); joinedSubclassAttributes.Set(x => x.Key, key); }
public bool IsSpecified(string property) { return(attributes.IsSpecified(property)); }
public override bool IsSpecified(string attribute) { return(attributes.IsSpecified(attribute)); }
public override bool IsSpecified(string property) { return attributes.IsSpecified(property); }