Beispiel #1
0
 private PerformanceRecord QueryPerformanceRecord(SQLiteConnection conn, CoreGenDescription desc)
 {
     var cmd = conn.CreateCommand();
     cmd.CommandText = desc.GetSql_QueryRecord();
     var reader = cmd.ExecuteReader();
     if (reader.Read())
     {
         var result = new PerformanceRecord();
         var props = typeof(PerformanceRecord).GetProperties();
         foreach (var pi in props)
         {
             object value = SqlCommands.UnwrapSqlValue(reader[pi.Name], pi.PropertyType);
             pi.SetValue(result, value, new object[0]);
         }
         return result;
     }
     else
     {
         return null;
     }
 }