public static IAddColumn AddColumn(this IAlter alter, Func <IColumnName, IColumnOption> column)
        {
            var sqlCommand = new ColumnCommand();
            var table      = alter.Table;

            sqlCommand.CommandSetions.Add("main", $"Alter Table [{table.Schema.Name}].[{table.Name}] Add");

            var columnFluent = new ColumnFluent(alter.Table, sqlCommand);

            column(columnFluent);

            alter.Table.Schema.DbMigratorBase.Commands.Add(columnFluent.SqlCommand);
            return(alter as IAddColumn);
        }
예제 #2
0
 internal EfCoreColumnFluent(ColumnFluent tf)
 {
     _cf = tf;
 }
예제 #3
0
 public static ColumnFluent JsonMap(this ColumnFluent col)
 {
     _dicJsonMapFluentApi.GetOrAdd(col._entityType, et => new ConcurrentDictionary <string, bool>())
     .GetOrAdd(col._property.Name, pn => true);
     return(col);
 }