public static SqlHospital FromDomain(Hospital hospital) { return(new SqlHospital { Id = hospital.HospitalId, Name = hospital.Name, MobileNumber = hospital.MobileNumber, Address = SqlAddress.FromDomain(hospital.Address) }); }
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 }); }