public async Task <IActionResult> Create([FromBody] AppointmentViewModel viewModel) { var command = new CreateAppointmentCommand(viewModel); var result = await mediator.Send(command); var locationUri = uriService.GetAppointmentUri(ApiRoutes.Appointments.Get, result.AppointmentId.ToString()); return(CreatedAtAction("locationUri", result)); }