예제 #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);
 }