public static T GetClassCsharp <T>(TableSql tableSql) { string className = "TestsORM" + "." + "User"; var myObj = Activator.CreateInstance(Type.GetType(className)); // namespace + type Type test = myObj.GetType(); return((T)myObj); }
public static TableSql GetTableSql <T>(T objectClass) { TableSql table = new TableSql(); table.TableName = ToSql(typeof(T).Name); foreach (PropertyInfo prop in typeof(T).GetProperties()) { table.ColumnList.Add(ToSql(prop.Name)); } return(table); }