Esempio n. 1
0
        internal ICodeFirst ConfigEntity <T>(Action <TableFluent <T> > entity)
        {
            if (entity == null)
            {
                return(_orm.CodeFirst);
            }
            var type   = typeof(T);
            var table  = dicConfigEntity.GetOrAdd(type, new TableAttribute());
            var fluent = new TableFluent <T>(table);

            entity.Invoke(fluent);
            Utils.RemoveTableByEntity(type, this);             //remove cache
            return(_orm.CodeFirst);
        }
Esempio n. 2
0
 internal HasManyFluent(IFreeSql fsql, TableFluent <T> modelBuilder, string manyProperty)
 {
     _fsql         = fsql;
     _tf           = modelBuilder;
     _selfProperty = manyProperty;
 }
Esempio n. 3
0
 internal HasOneFluent(IFreeSql fsql, TableFluent <T> modelBuilder, string oneProperty)
 {
     _fsql         = fsql;
     _tf           = modelBuilder;
     _selfProperty = oneProperty;
 }
Esempio n. 4
0
 internal EfCoreTableFluent(IFreeSql fsql, TableFluent <T> tf)
 {
     _fsql = fsql;
     _tf   = tf;
 }
Esempio n. 5
0
 internal HasIndexFluent(TableFluent <T> modelBuilder, string indexName, List <string> columns)
 {
     _modelBuilder = modelBuilder;
     _indexName    = indexName;
     _columns      = columns;
 }
Esempio n. 6
0
 internal HasManyFluent(TableFluent <T> modelBuilder, string manyProperty)
 {
     _tf           = modelBuilder;
     _selfProperty = manyProperty;
 }
Esempio n. 7
0
 internal HasOneFluent(TableFluent <T> modelBuilder, string oneProperty)
 {
     _tf           = modelBuilder;
     _selfProperty = oneProperty;
 }
Esempio n. 8
0
 internal EfCoreTableFluent(TableFluent <T> tf)
 {
     _tf = tf;
 }
Esempio n. 9
0
 internal EfCoreTableFluent(IFreeSql fsql, TableFluent tf, Type entityType)
 {
     _fsql       = fsql;
     _tf         = tf;
     _entityType = entityType;
 }