Ejemplo n.º 1
0
        public async Task <IActionResult> PutHealthcareAssistents(int id, HealthcareAssistents healthcareAssistents)
        {
            if (id != healthcareAssistents.HealthcareAssistentId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <HealthcareAssistents> > PostHealthcareAssistents(HealthcareAssistents healthcareAssistents)
        {
            _context.HealthcareAssistents.Add(healthcareAssistents);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetHealthcareAssistents", new { id = healthcareAssistents.HealthcareAssistentId }, healthcareAssistents));
        }