public ActionResult <IEnumerable <Angazovanje> > Get()
        {
            var angazovanja    = _service.GetAll().ToList();
            var angazovanjaDTO = _mapper.Map <IEnumerable <AngazovanjaDTO> >(angazovanja);

            return(Ok(angazovanjaDTO));
        }
        public IActionResult Index(string message)

        {
            try
            {
                ViewBag.ListaAngazovanja = service.GetAll().ToList();
                List <Zadatak> zadaci = serviceZadaci.GetAll().Distinct(new ZadatakComparer()).ToList();
                ViewBag.ListaZadataka = zadaci;
                if (message == null)
                {
                    message = string.Empty;
                }
                ViewBag.Message = message;
                return(View());
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Error", "Home", new { message = ex.Message }));
            }
        }
        public IActionResult Details(int?id)
        {
            try
            {
                IEnumerable <Angazovanje> angazovanjaNaZadatku = serviceAngazovanje.GetAll().Where(a => a.ZadatakId == id).ToList();

                if (angazovanjaNaZadatku == null)
                {
                    throw new Exception("Zadatak čije podaatke zahtevate ne postoji!");
                }



                ViewBag.ZadatakId = id;
                return(View(angazovanjaNaZadatku));
            }
            catch (Exception ex)
            {
                return(RedirectToAction("Error", "Home", new { message = ex.Message }));
            }
        }