Esempio n. 1
0
 public ChallengeFileComponent()
 {
     mifnexsoEntities = new MIFNEXSOEntities();
     challengeFile    = new ChallengeFile();
     challengeFile.ChallengeObjectId    = Guid.Empty;
     challengeFile.ChallengeReferenceId = string.Empty;
     mifnexsoEntities.ChallengeFiles.AddObject(challengeFile);
 }
Esempio n. 2
0
 public ChallengeFileComponent(Guid challengeObjectId)
 {
     if (challengeObjectId != Guid.Empty)
     {
         mifnexsoEntities = new MIFNEXSOEntities();
         try
         {
             challengeFile = mifnexsoEntities.ChallengeFiles.FirstOrDefault(a => a.ChallengeObjectId == challengeObjectId);
             if (challengeFile == null)
             {
                 challengeFile = new ChallengeFile();
                 challengeFile.ChallengeObjectId    = Guid.Empty;
                 challengeFile.ChallengeReferenceId = string.Empty;
                 mifnexsoEntities.ChallengeFiles.AddObject(challengeFile);
             }
         }
         catch (Exception)
         {
             throw;
         }
     }
 }