Пример #1
0
        public IActionResult Index()
        {
            // Retrieve and convert all - active - patients
            List <Patient> patienten        = patientRepository.GetAll();
            List <PatientListViewModel> vms = patientVMC.PatientlistToViewModel(patienten);

            return(View(vms));
        }
Пример #2
0
        public IActionResult Create(long id = 0)
        {
            // Get and convert treatment
            TreatmentDetailViewModel vm = new TreatmentDetailViewModel
            {
                Patients       = PatientConverter.PatientlistToViewModel(patientRepository.GetAll()),
                TreatmentTypes = TypeConverter.ModelsToViewModel(treatmentTypeRepository.GetAll()),
                PatientId      = id
            };

            return(View(vm));
        }