public async Task Update(PhieuDatChiTiet inputModel) { try { await _unitOfWork.PhieuDatChiTietRepository.Update(inputModel); await _unitOfWork.SaveChange(); } catch (Exception ex) { await _unitOfWork.Rollback(); throw ex; } }
public async Task <PhieuDatChiTiet> Create(PhieuDatChiTiet inputModel) { try { var result = await _unitOfWork.PhieuDatChiTietRepository.Add(inputModel); await _unitOfWork.SaveChange(); return(result); } catch (Exception ex) { throw ex; } }