示例#1
0
 /// <summary>
 /// Generate the CREATE TABLE statement for the current Thing Class
 /// </summary>
 /// <returns>Thq SQL Create query</returns>
 public string GenerateCreateSQL()
 {
     if (_createThingQuery == null)
     {
         AttributesExtractor <IThing>     attributes = new AttributesExtractor <IThing>(this);
         MysqlBuilder.MysqlCommandBuilder builder    = new MysqlBuilder.MysqlCommandBuilder(GetType().Name);
         _createThingQuery = builder.BuildCreate(attributes.PropertiesWithAttributes());
     }
     return(_createThingQuery);
 }
示例#2
0
文件: Shelf.cs 项目: Kempaf/CabiNet
 /// <summary>
 /// Initialize with conection
 /// </summary>
 /// <param name="con">the ODBC connection</param>
 public Shelf(OdbcConnection con)
 {
     TableName    = typeof(T).Name;
     Connection   = con;
     MySqlBuilder = new MysqlBuilder.MysqlCommandBuilder(TableName);
 }