public async Task <IActionResult> PutKrvnaGrupa(int id, KrvnaGrupa krvnaGrupa)
        {
            if (id != krvnaGrupa.KrvnaGrupaId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutDonor(int id, Donor donor)
        {
            if (id != donor.DonorId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }