void ParseEntityType(Type type)
 {
     var tableSechma = TableInfoManager.GetTable(type);
     var tableInfo = new Table()
     {
         DataBase = tableSechma.DataBase,
         Name = tableSechma.Name,
         Type = tableSechma.Type
     };
     var columns = tableSechma.Columns;
     foreach (var columnValue in columns.Values)
     {
         var column = new Column();
         column.Name = columnValue.Name;
         column.DataType = columnValue.PropertyInfo.PropertyType;
         column.MemberInfo = columnValue.PropertyInfo;
         column.Table = tableInfo;
         Columns.Add(column);
         Context.Columns.Add(columnValue.Name, column);
     }
 }
Exemplo n.º 2
0
 public abstract string GetTableName(Table leftTable);
Exemplo n.º 3
0
 public override string GetTableName(Table table)
 {
     var tableName = string.Empty;
     if (!string.IsNullOrWhiteSpace(table.DataBase))
     {
         tableName = string.Format("[{0}].DBO.", table.DataBase);
     }
     tableName = string.Format("{0}[{1}]", tableName, table.Name);
     return tableName;
 }
Exemplo n.º 4
0
 public override string GetTableName(Table table)
 {
     var tableName = string.Empty;
     tableName = string.Format("{0}[{1}]", tableName, table.Name);
     return tableName;
 }