public async Task <IActionResult> Create(PaRequestDTO model) { try { await _paRequestRepository.CreatePaRequest(model); var status = true; return(Ok(status)); } catch (Exception ex) { var status = false; return(BadRequest(status)); } }
public async Task CreatePaRequest(PaRequestDTO paRequestDTO) { await _context.AddRangeAsync(paRequestDTO.PaRequests); await _context.SaveChangesAsync(); }