public async Task<IHttpActionResult> PutDogadjaj(int id, Dogadjaj dogadjaj)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != dogadjaj.Id)
            {
                return BadRequest();
            }

            db.Entry(dogadjaj).State = EntityState.Modified;

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

            return StatusCode(HttpStatusCode.NoContent);
        }
        public async Task<IHttpActionResult> PostDogadjaj(Dogadjaj dogadjaj)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.Dogadjaji.Add(dogadjaj);
            await db.SaveChangesAsync();

            return CreatedAtRoute("DefaultApi", new { id = dogadjaj.Id }, dogadjaj);
        }