Ejemplo n.º 1
0
        private static void ProcessType(string type, ICreateTableColumnAsTypeSyntax column)
        {
            switch (type)
            {
            case "short":
            case "int16":
                column.AsInt16();
                break;

            case "int":
            case "int32":
                column.AsInt32();
                break;

            case "datetime":
                column.AsDateTime();
                break;

            case "guid":
                column.AsGuid();
                break;

            case "string":
            default:
                column.AsString();
                break;
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates column as a standard auto-increment 32 bit integer ID primary key column
 /// </summary>
 public static ICreateTableColumnOptionOrWithColumnSyntax AsIdColumn(this ICreateTableColumnAsTypeSyntax syntax)
 {
     return(syntax.AsInt32().Identity().NotNullable().PrimaryKey());
 }