コード例 #1
0
 public virtual void Delete()
 {
     if (this.BaseDataAccessAvailable())
     {
         TestSprocGenerator.Data.SingleTable.Dto.EmailAddress dto       = _baseBusiness.FillDtoWithThis(this);
         TestSprocGenerator.Data.SingleTable.Dto.EmailAddress returnDto = _baseDataAccess.Delete(dto);
         this.FillThisWithDto(returnDto);
     }
     else
     {
         throw new System.ApplicationException(FILL_DB_SETTINGS_EXCEPTION);
     }
 }
コード例 #2
0
        public bool DoesEmailExist(string email)
        {
            bool exists = false;

            RegistrationDataAccess registrationDataAccess = new RegistrationDataAccess();

            TestSprocGenerator.Data.SingleTable.Dto.EmailAddress emailAssociatedWithAnAccount = registrationDataAccess.GetEmailIfAssociatedWithAValidAccount(email);
            if (emailAssociatedWithAnAccount != null)
            {
                exists = true;
            }

            return(exists);
        }
コード例 #3
0
 public virtual void GetByPrimaryKey()
 {
     if (this.BaseDataAccessAvailable())
     {
         TestSprocGenerator.Data.SingleTable.Dto.EmailAddress        dto       = this;
         List <TestSprocGenerator.Data.SingleTable.Dto.EmailAddress> returnDto = _baseDataAccess.Get(dto, CommonLibrary.Enumerations.GetPermutations.ByPrimaryKey);
         if ((returnDto.Count > 0))
         {
             this.FillThisWithDto(returnDto[0]);
         }
         else
         {
             throw new System.ApplicationException(PRIMARY_KEY_NOT_FOUND_EXCEPTION_VAR_NAME);
         }
     }
     else
     {
         throw new System.ApplicationException(FILL_DB_SETTINGS_EXCEPTION);
     }
 }
コード例 #4
0
 private void FillThisWithDto(TestSprocGenerator.Data.SingleTable.Dto.EmailAddress filledDto)
 {
     _baseBusiness.FillThisWithDto(filledDto, this);
 }