Beispiel #1
0
        public async Task <ActionResult <Mascota> > PostMascota(Mascota item)
        {
            _baseDatos.Mascotas.Add(item);
            await _baseDatos.SaveChangesAsync();

            return(CreatedAtAction(nameof(GetMascota), new { id = item.Id }, item));
        }
Beispiel #2
0
        public async Task <ActionResult <Raza> > PostRaza(Raza item)
        {
            _baseDatos.Razas.Add(item);
            await _baseDatos.SaveChangesAsync();

            return(CreatedAtAction(nameof(GetRaza), new { id = item.Id }, item));
        }