public static HospitalTypeDto ToDto(this HospitalType hospitalType) { var dto = new HospitalTypeDto { }; ((IData)hospitalType).ToDto((IDataDto)dto); return(dto); }
public static HospitalType ToDomain(this HospitalTypeDto hospitalType, HospitalType originalHospitalType = null) { if (originalHospitalType != null && originalHospitalType.Id == hospitalType.Id) { ((IDataDto)hospitalType).ToDomain((IData)originalHospitalType); return(originalHospitalType); } var data = new HospitalType { }; ((IDataDto)hospitalType).ToDomain((IData)data); return(data); }