public PartialViewResult EditAppointmentRecord(long appointmentRecordId) { AppointmentRecordVM appointment = MapperUtilVM.MapToAppointmentRecordVM(appointmentService.GetAppointmentRecord(appointmentRecordId)); return(PartialView("_EditAppointmentRecord", appointment)); }
public JsonResult CreateAppRecord(AppointmentRecordVM appointmentRecordVM) { appointmentService.AddAppointmentRecord(MapperUtilVM.MapToAppointmentRecordDTO(appointmentRecordVM)); return(Json(appointmentRecordVM, JsonRequestBehavior.AllowGet)); }
public static AppointmentRecordDTO MapToAppointmentRecordDTO(AppointmentRecordVM appointmentRecordVM) { return(new MapperConfiguration(cfg => cfg.CreateMap <AppointmentRecordVM, AppointmentRecordDTO>()).CreateMapper() .Map <AppointmentRecordVM, AppointmentRecordDTO>(appointmentRecordVM)); }