public VaccinationReservationDataModel GetById(int id)
        {
            RepositoryGateWay <RegistrarsRepository>       RegistrarsDataBaseGateWay;
            RepositoryGateWay <VaccinationTypesRepository> VaccinationTypeDataBaseGateWay;
            RegistrarsRepository       registrar;
            VaccinationTypesRepository VaccinationTypes;

            VaccinationReservationRepository vaccinationReservation = dataBaseGateWay.GetById(c => c.Id == id);

            RegistrarsDataBaseGateWay      = new RepositoryGateWay <RegistrarsRepository>();
            VaccinationTypeDataBaseGateWay = new RepositoryGateWay <VaccinationTypesRepository>();

            registrar        = RegistrarsDataBaseGateWay.GetById(c => c.Id == vaccinationReservation.RegistrarId);
            VaccinationTypes = VaccinationTypeDataBaseGateWay.GetById(c => c.Id == vaccinationReservation.VaccinationTypeId);
            return(new VaccinationReservationDataModel
            {
                Id = vaccinationReservation.Id,
                RegistrarId = vaccinationReservation.RegistrarId,
                Registrar = new RegistrarsDataModel {
                    Name = registrar.Name, Telephone = registrar.Telephone
                },
                VaccinationType = new VaccinationTypesDataModel {
                    Name = VaccinationTypes.Name
                },

                ReservationDateTime = vaccinationReservation.ReservationDateTime
            });
        }
 public VaccinationTypesOperationsClass()
 {
     dataBaseGateWay = new RepositoryGateWay <VaccinationTypesRepository>();
 }
Exemplo n.º 3
0
 public SystemSettingsOperationsClass()
 {
     dataBaseGateWay = new RepositoryGateWay <SystemSettingsRepository>();
 }
 public VaccinationAppointmentModelMapper()
 {
     dataBaseGateWay = new RepositoryGateWay <VaccinationReservationRepository>();
 }
Exemplo n.º 5
0
 public RegistrarsOperationsClass()
 {
     dataBaseGateWay = new RepositoryGateWay <RegistrarsRepository>();
 }