/// <summary>
 /// AssemblyConfiguration method implementation
 /// </summary>
 public bool SetAssemblyConfiguration(AssemblyConfiguration cfg, AssemblyConfiguration newcfg)
 {
     using (var cnx = new SqlConnection(ConnectString()))
     {
         string upd = "UPDATE dbo.AssemblyConfiguration SET AssemblyFulldescription = @AssemblyFulldescription, AssemblyTypeDescription = @AssemblyTypeDescription, TraceResolve = @TraceResolve, Selected = @Selected, ClaimsExt=@ClaimsExt WHERE AssemblyFulldescription = @OldAssemblyFulldescription AND AssemblyTypeDescription = @OldAssemblyTypeDescription";
         string ins = "INSERT INTO dbo.AssemblyConfiguration (AssemblyFulldescription, AssemblyTypeDescription, TraceResolve, Selected, ClaimsExt) VALUES (@AssemblyFulldescription, @AssemblyTypeDescription, @TraceResolve, @Selected, @ClaimsExt)";
         cnx.Open();
         if (cfg != null)  // Update
         {
             if (cnx.Execute(upd, new { AssemblyFulldescription = newcfg.AssemblyFulldescription, AssemblyTypeDescription = newcfg.AssemblyTypeDescription, TraceResolve = newcfg.TraceResolve, Selected = newcfg.Selected, ClaimsExt = newcfg.ClaimsExt, OldAssemblyFulldescription = cfg.AssemblyFulldescription, OldAssemblyTypeDescription = cfg.AssemblyTypeDescription }) >= 1)
             {
                 return(true);
             }
             else  // do insert not probable
             {
                 return(cnx.Execute(ins, new { AssemblyFulldescription = newcfg.AssemblyFulldescription, AssemblyTypeDescription = newcfg.AssemblyTypeDescription, TraceResolve = newcfg.TraceResolve, Selected = newcfg.Selected, ClaimsExt = newcfg.ClaimsExt }) == 1);
             }
         }
         else // Insert
         {
             if (cnx.Execute(upd, new { AssemblyFulldescription = newcfg.AssemblyFulldescription, AssemblyTypeDescription = newcfg.AssemblyTypeDescription, TraceResolve = newcfg.TraceResolve, Selected = newcfg.Selected, ClaimsExt = newcfg.ClaimsExt, OldAssemblyFulldescription = newcfg.AssemblyFulldescription, OldAssemblyTypeDescription = newcfg.AssemblyTypeDescription }) >= 1)
             {
                 return(true);
             }
             else // do insert
             {
                 return(cnx.Execute(ins, new { AssemblyFulldescription = newcfg.AssemblyFulldescription, AssemblyTypeDescription = newcfg.AssemblyTypeDescription, TraceResolve = newcfg.TraceResolve, Selected = newcfg.Selected, ClaimsExt = newcfg.ClaimsExt }) == 1);
             }
         }
     }
 }
 /// <summary>
 /// DeleteDomainConfiguration method implementation
 /// </summary>
 public bool DeleteAssemblyConfiguration(AssemblyConfiguration cfg)
 {
     using (var cnx = new SqlConnection(ConnectString()))
     {
         string del = "DELETE FROM dbo.AssemblyConfiguration WHERE AssemblyFulldescription = @AssemblyFulldescription AND AssemblyTypeDescription = @AssemblyTypeDescription";
         cnx.Open();
         if (cnx.Execute(del, new { AssemblyFulldescription = cfg.AssemblyFulldescription, AssemblyTypeDescription = cfg.AssemblyTypeDescription }) >= 1)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
 }