コード例 #1
0
        /// <see cref="GAP.Appointments.Core.Repository.IEmployeeRepository.GetPacientInfo(string)"
        public async Task <PacientTO> GetPacientInfo(string IdPacient)
        {
            //Get employees list from data source
            PacientTO Pacient = await AppointmentDAO.GetPacientInfo(IdPacient);

            return(Pacient);
        }
コード例 #2
0
        public async Task <PacientTO> GetPacientInfo(string IdPacient)
        {
            PacientTO PacienteInfoByPacient = new PacientTO();

            using (AppointmentsEntities dbContext = new AppointmentsEntities())
            {
                PacienteInfoByPacient = await dbContext.Pacients.Where(x => x.Id == IdPacient).ProjectTo <PacientTO>().FirstOrDefaultAsync();
            }
            return(PacienteInfoByPacient);
        }
コード例 #3
0
        public void GetInfoPacientByPacient()
        {
            //token
            RestClient client;
            string     appointmentServiceUrl = ConfigurationManager.AppSettings["APIRoot"];

            client = new RestClient(appointmentServiceUrl);

            var request = new RestRequest("GetPacientInfo", Method.GET);

            request.AddQueryParameter("IdPacient", "Berbuscar"); // aplica para cada estacion, etiqueta, parametro

            // execute the request
            IRestResponse response = client.ExecuteAsGet(request, "GET");

            PacientTO Pacient = JsonConvert.DeserializeObject <PacientTO>(response.Content);

            Assert.IsNotNull(Pacient);
            Assert.IsNotNull(Pacient.Name);
        }
コード例 #4
0
        public async Task <IHttpActionResult> GetPacientInfo(string IdPacient)
        {
            PacientTO PacientInfo = await _repository.GetPacientInfo(IdPacient);

            return(Ok(PacientInfo));
        }