예제 #1
0
        public async Task <IActionResult> UpdateLoaiYeuCau(int id, [FromBody] LoaiYeuCauDTO loaiYeuCauDTO)
        {
            var loaiYeuCau = loaiYeuCauDTO.ToEntity();
            await _loaiYeuCauService.UpdateLoaiYeuCau(loaiYeuCau);

            return(Ok(loaiYeuCau));
        }
예제 #2
0
        public async Task <IActionResult> CreateLoaiYeuCau(LoaiYeuCauDTO loaiYeuCauDTO)
        {
            var loaiYeuCau = loaiYeuCauDTO.ToEntity();
            await _loaiYeuCauService.CreateLoaiYeuCau(loaiYeuCau);

            return(Ok(loaiYeuCau));
        }