public void PutAppointment(AppointmentCreateModel model)
        {
            model.UserId = RequestContext.Principal.Identity.GetUserId();

            AppointmentData data = new AppointmentData();
            //  data.Create(model);
        }
Exemple #2
0
        public async Task <IActionResult> CreateAppointment([FromBody] AppointmentCreateModel model)
        {
            var result = await _appointmentService.CreateAppointment(_mapper.Map <AppointmentDTO>(model));

            return(CreatedAtAction(nameof(GetAppointmentById), new
            {
                id = result.Id
            }, result));
        }
Exemple #3
0
        public void Create(AppointmentCreateModel model)
        {
            SqlDataAccess sql = new SqlDataAccess();

            var T = new
            {
                DoctorId  = model.DocId,
                UserId    = model.UserId,
                Time1     = model.Time1,
                Time2     = model.Time2,
                Status    = model.Status,
                Location  = model.Location,
                VaccineId = model.VacId,
                Date      = model.Date
            };

            sql.SaveData <dynamic>("dbo.spCreateAppointment", T, "DefaultConnection");
        }