Esempio n. 1
0
        public async Task <IActionResult> PutAuditLine(int id, AuditLineAll auditLineAll)
        {
            if (id != auditLineAll.LineId)
            {
                return(BadRequest());
            }
            _context.Entry(auditLineAll).State = EntityState.Modified;
            try
            {
                await _context.SaveChangesAsync();

                return(Ok(auditLineAll));
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AuditHeaderAllExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }
        }
Esempio n. 2
0
        public async Task <ActionResult <AuditLineAll> > PostAuditDetail(AuditLineAll auditLineAll)
        {
            _context.AuditLineAlls.Add(auditLineAll);
            await _context.SaveChangesAsync();

            // return Ok("Successful");
            return(CreatedAtAction("PostAuditDetail", new { id = auditLineAll.LineId }, auditLineAll));
        }