예제 #1
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     if (instance.TableName != null)
     {
         instance.Table(AlterTableName(instance.TableName));
     }
 }
예제 #2
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     if (instance.TableName != null)
     {
         instance.Table(AlterTableName(instance.TableName));
     }
 }
예제 #3
0
        public void Apply(IJoinedSubclassInstance instance)
        {
            var tableName = NameConventions.Quote(NameConventions.GetTableName(instance.EntityType));

            instance.Table(tableName);
            instance.BatchSize(25);
        }
		public void Apply(IJoinedSubclassInstance instance)
		{
			string tableName = NameConventions.GetTableName(instance.EntityType);

			instance.Table(tableName);
			instance.BatchSize(25);
		}
예제 #5
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     if (instance.TableName.IsNotNull())
     {
         instance.Table(
             string.Format("`{0}_{1}`", Prefix, instance.TableName.Replace("`", ""))
             );
     }
 }
        public void Apply(IJoinedSubclassInstance instance)
        {
            // pluralize table names
            instance.Table(instance.EntityType.Name.Pluralize());

            if (instance.Type.BaseType != null)
                instance.Key.ForeignKey(
                    $"FK_{instance.EntityType.Name.Pluralize()}_Join_{instance.Type.BaseType.Name.Pluralize()}");
        }
 public void Apply(IJoinedSubclassInstance instance)
 {
     if (instance.TableName.IsNotNull())
     {
         instance.Table(
             string.Format("`{0}_{1}`", Prefix, instance.TableName.Replace("`", ""))
         );
     }
 }
        public void Apply(IJoinedSubclassInstance instance)
        {
            // pluralize table names
            instance.Table(instance.EntityType.Name.Pluralize());

            if (instance.Type.BaseType != null)
            {
                instance.Key.ForeignKey(
                    $"FK_{instance.EntityType.Name.Pluralize()}_Join_{instance.Type.BaseType.Name.Pluralize()}");
            }
        }
예제 #9
0
        public void Apply(IJoinedSubclassInstance instance)
        {
            var attribute = GetAttribute(instance.EntityType);

            if (attribute == null)
            {
                return;
            }
            instance.Table(attribute.TableName);
            if (!String.IsNullOrEmpty(attribute.Schema))
            {
                instance.Schema(attribute.Schema);
            }
        }
예제 #10
0
        /// <summary>
        /// Adds Module namespace to schema.
        /// </summary>
        /// <param name="instance">The instance.</param>
        public void Apply(IJoinedSubclassInstance instance)
        {
            var type      = instance.EntityType;
            var schema    = SchemaConvention.GetModuleName(type);
            var tableName = TableNameConvention.GetTableName(type);

            var attr = type.GetAttribute <MapTableAttribute>();
            var key  = instance.EntityType.BaseType.Name;

            key = $"{key}_Id";
            key = attr?.PrimaryKey ?? key;
            key = key.ToLower();
            if (!schema.IsNullOrEmpty())
            {
                instance.Schema(schema);
            }
            instance.Table($"{tableName}");
            instance.Key.Column(key);
        }
예제 #11
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Schema(Schema);
     instance.Table(instance.EntityType.Name + ConventionConstants.TableSuffix);
     instance.Key.Column(instance.EntityType.BaseType.Name + ConventionConstants.Id);
 }
예제 #12
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table("tbl");
 }
        public void Apply(IJoinedSubclassInstance instance)
        {
            string typeName = instance.EntityType.Name;

            instance.Table(Inflector.Inflector.Pluralize(typeName));
        }
예제 #14
0
        public void Apply(IJoinedSubclassInstance instance)
        {
            string tableName = NameConventions.GetTableName(instance.EntityType);

            instance.Table(tableName);
        }
 public void Apply(IJoinedSubclassInstance instance) {
     instance.Table(instance.EntityType.Name + "Table");
     instance.Key.Column(instance.EntityType.Name + "Id");
 }
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table(instance.EntityType.Name.Underscore());
     instance.Key.Column("id");
 }
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table(instance.EntityType.Name.ToDatabaseName());
 }
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table(GetTableName(instance.EntityType.Name));
 }
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table(Singularizer.Singularize(this.CleanTableName(instance.EntityType.Name)));
 }
예제 #20
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Schema(Schema);
     instance.Table(instance.EntityType.Name + ConventionConstants.TableSuffix);
     instance.Key.Column(instance.EntityType.BaseType.Name + ConventionConstants.Id);
 }
예제 #21
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table("test-table");
     instance.Key.Column("test");
 }
예제 #22
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table(string.Format("{0}", instance.Type.Name.Replace("Entity", "")));
 }
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table(Singularizer.Singularize(this.CleanTableName(instance.EntityType.Name)));
 }
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table(instance.EntityType.Name.ToDatabaseName());
 }
예제 #25
0
 public void Apply(IJoinedSubclassInstance instance)
 {
     instance.Table(instance.EntityType.Name.ToPlural());
     instance.BatchSize(250);
 }
 public void Apply(IJoinedSubclassInstance instance)
 {
     var tableName = instance.EntityType.Name.ToPlural();
     instance.Table(NameConventions.ReplaceCamelCaseWithUnderscore(tableName));
     instance.BatchSize(250);
 }