Ejemplo n.º 1
0
 public static SqlHospital FromDomain(Hospital hospital)
 {
     return(new SqlHospital
     {
         Id = hospital.HospitalId,
         Name = hospital.Name,
         MobileNumber = hospital.MobileNumber,
         Address = SqlAddress.FromDomain(hospital.Address)
     });
 }
Ejemplo n.º 2
0
 public static SqlPatient ToDomain(Patient patient)
 {
     return(new SqlPatient
     {
         Id = patient.PatientId,
         Name = patient.Name,
         DateOfBirth = patient.DateOfBirth,
         Gender = (int)patient.Gender,
         Address = SqlAddress.FromDomain(patient.Address),
         MobileNumber = patient.MobileNumber,
         HospitalId = patient.HospitalId
     });
 }