Exemplo n.º 1
0
        public async Task <IActionResult> CreateScheduleTaskHistory(ScheduleTaskHistoryDTO scheduleTaskHistoryDTO)
        {
            var scheduleTaskHistory = scheduleTaskHistoryDTO.ToEntity();
            await _scheduleTaskHistoryService.CreateScheduleTaskHistory(scheduleTaskHistory);

            return(Ok(scheduleTaskHistory));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> UpdateScheduleTaskHistory(int id, [FromBody] ScheduleTaskHistoryDTO scheduleTaskHistoryDTO)
        {
            var scheduleTaskHistory = scheduleTaskHistoryDTO.ToEntity();
            await _scheduleTaskHistoryService.UpdateScheduleTaskHistory(scheduleTaskHistory);

            return(Ok(scheduleTaskHistory));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> GetScheduleTaskHistoryById(int id)
        {
            var scheduleTaskHistory = await _scheduleTaskHistoryService.GetScheduleTaskHistoryById(id);

            var result = ScheduleTaskHistoryDTO.FromEntity(scheduleTaskHistory);

            return(Ok(result));
        }