Exemple #1
0
        public async Task <IActionResult> PutPmtctData(string id, PmtctData pmtctData)
        {
            if (id != pmtctData.NambaMshiriki01)
            {
                return(BadRequest());
            }

            _context.Entry(pmtctData).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!PmtctDataExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutPmtctFollowUp(int id, PmtctFollowUp pmtctFollowUp)
        {
            if (id != pmtctFollowUp.ID)
            {
                return(BadRequest());
            }

            _context.Entry(pmtctFollowUp).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!PmtctFollowUpExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }