コード例 #1
0
        public RegistrationInPharmacy Create(RegistrationInPharmacyDto dto)
        {
            RegistrationInPharmacy registration = RegistrationInPharmacyAdapter.RegistrationDtoToRegistration(dto);

            if (isApiKeyUnique(registration.ApiKey))
            {
                return(RegistrationInPharmacyRepository.Create(registration));
            }
            return(null);
        }
コード例 #2
0
 public RegistrationInPharmacy createIRegistration(RegistrationInPharmacyDto dto)
 {
     foreach (RegistrationInPharmacy registrationIRepo in IRegistrationRepository.GetAll())
     {
         if (registrationIRepo.ApiKey.Equals(RegistrationInPharmacyAdapter.RegistrationDtoToRegistration(dto).ApiKey))
         {
             return(null);
         }
     }
     return(RegistrationInPharmacyAdapter.RegistrationDtoToRegistration(dto));
 }