public void CreateAppointmentRequest(AppointmentCreateInputModel input)
 {
     MicroserviceResponse response = Execute(
         _client.BaseAddress.ToString(),
         new {
         input.CustomerId,
         input.Date,
         input.OfferId,
         IsConfirmed = false
     },
         HttpMethod.Post);
 }
Esempio n. 2
0
        public IActionResult CreateAppointmentRequest(AppointmentCreateInputModel input)
        {
            var appointment = new Appointment()
            {
                CustomerId    = input.CustomerId,
                OfferId       = input.OfferId,
                Date          = input.Date,
                IsConfirmed   = false,
                DateRequested = DateTime.Now
            };

            _repository.Add(appointment);
            _repository.SaveChanges();

            return(Ok(appointment.Id));
        }