public ActionResult Add(AddLocationCategoryVM model)
        {
            using (TruckTransportDbContext _db = new TruckTransportDbContext())
            {
                if (_db.kategorije.AsNoTracking().Where(x => x.naziv == model.Name).FirstOrDefault() != null)
                {
                    ModelState.AddModelError("", "Naziv kategorije lokacije već postoji!");
                }

                if (ModelState.IsValid)
                {
                    kategorije newLocationCategoryDB = new kategorije {
                        naziv = model.Name
                    };

                    _db.kategorije.Add(newLocationCategoryDB);
                    _db.SaveChanges();

                    return(Json(data: new { success = true }));
                }
            }

            return(PartialView(viewName: "_Add", model: model));
        }
        public ActionResult Add()
        {
            AddLocationCategoryVM model = new AddLocationCategoryVM();

            return(PartialView(viewName: "_Add", model: model));
        }