public CaseViewModel(Case obj) { obj.setPatientNameFromDb(); obj.setPatientSurnameFromDb(); this.caseObj = new Case(); CaseID = obj.caseID; PatientID = obj.patientID; StartDate = obj.startDate; EndDate = obj.endDate; Description = obj.description; PatientName = obj.patientName; PatientSurname = obj.patientSurname; }