Example #1
0
 public void CreateTableFromFieldlistTest()
 {
     using (WorkingDir wd = new WorkingDir(Utili.GetCurrentMethodAndClass()))
     {
         wd.ClearDirectory();
         var srl = new SqlResultLoggingService(wd.WorkingDirectory);
         SqlResultLoggingService.FieldDefinition        fd     = new SqlResultLoggingService.FieldDefinition("name", "text");
         List <SqlResultLoggingService.FieldDefinition> fields = new List <SqlResultLoggingService.FieldDefinition>
         {
             fd
         };
         srl.MakeTableForListOfFields(fields, new HouseholdKey("hh0"), "tbl1");
         wd.CleanUp();
     }
 }
Example #2
0
 public void DoubleSaveDictionaryTest()
 {
     using (WorkingDir wd = new WorkingDir(Utili.GetCurrentMethodAndClass()))
     {
         wd.ClearDirectory();
         var srl = new SqlResultLoggingService(wd.WorkingDirectory);
         SqlResultLoggingService.FieldDefinition        fd     = new SqlResultLoggingService.FieldDefinition("name", "text");
         List <SqlResultLoggingService.FieldDefinition> fields = new List <SqlResultLoggingService.FieldDefinition>
         {
             fd
         };
         var hhkey = new HouseholdKey("hh0");
         srl.MakeTableForListOfFields(fields, hhkey, "tbl1");
         Dictionary <string, object> values = new Dictionary <string, object>
         {
             { "name", "blub" }
         };
         srl.SaveDictionaryToDatabaseNewConnection(values, "tbl1", hhkey);
         wd.CleanUp();
     }
 }