Exemple #1
0
        public static CreateConstraintExpression GetCreateUniqueConstraintExpression()
        {
            var expression = new CreateConstraintExpression(ConstraintType.Unique);

            expression.Constraint.TableName = TestTableName1;
            expression.Constraint.Columns.Add(TestColumnName1);
            expression.ApplyConventions(new MigrationConventions());
            return(expression);
        }
Exemple #2
0
        public static CreateConstraintExpression GetCreateMultiColumnPrimaryKeyExpression()
        {
            var expression = new CreateConstraintExpression(ConstraintType.PrimaryKey);

            expression.Constraint.TableName = TestTableName1;
            expression.Constraint.Columns.Add(TestColumnName1);
            expression.Constraint.Columns.Add(TestColumnName2);
            expression.ApplyConventions(new MigrationConventions());
            return(expression);
        }