Beispiel #1
0
        private bool AddOrUpdateEmail(riderDto riderDto)
        {
            bool blReturn = true;

            try
            {
                Email email = riderDto.email;
                email.UserId = riderDto.Id;

                var dbValue = GetEmailById(riderDto.Id);

                blReturn = (dbValue == null) ? _riderRepository.AddEmailToDatabase(email) : _riderRepository.EditObjectInDatabase(dbValue, email);
            }

            catch (Exception ex)
            {
            }

            return(blReturn);
        }