public EntityBuilder Entity(string @namespace, string name) { @namespace.ThrowIfNullOrWhitespace(nameof(@namespace)); name.ThrowIfNullOrWhitespace(nameof(name)); DefaultNamePattern.ThrowIfDoesNotMatch(@namespace, nameof(@namespace)); DefaultNamePattern.ThrowIfDoesNotMatch(name, nameof(name)); if (_entityBuilders.Any(tf => tf.DefinesEntity(@namespace, name))) { throw new InvalidOperationException($"Entity \"{@namespace}.{name}\" already exists."); } var entityBuilder = new EntityBuilder(this, @namespace, name); _entityBuilders.Add(entityBuilder); return(entityBuilder); }
public PrimaryKeyPropertyBuilder(EntityBuilder entityBuilder, int ordinal, string name) : base(entityBuilder, ordinal, name) { }
internal PropertyBuilderBase(EntityBuilder entityBuilder, int ordinal, string name) { _entityBuilder = entityBuilder; Ordinal = ordinal; Name = name; }