public void Put(long id, [FromBody] Department department)
 {
     department.DepartmentId = id;
     departmentBll.UpdateDepartment(id, department);
     //departmentProcessor.Update(department);
     //return department;
 }
        public ActionResult Edit(long id, Department department)
        {
            try
            {
                activeUser = userBll.GetUserById((long)HttpContext.Session.GetInt32("userId"));
                ViewData["sessionData"] = new int?[] { HttpContext.Session.GetInt32("admin"), HttpContext.Session.GetInt32("language") };

                if (activeUser.Administrator > 0)
                {
                    department.DepartmentId = id;
                    departmentBll.UpdateDepartment(id, department);
                }

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(RedirectToAction(nameof(Index)));
            }
        }
 //implementatie REST protocol voor met de JSON code langs front-end overweg te kunnen [FromBody]
 //Het [FromBody] attribuut zal gebruikt worden om het content type te bepalen
 public void Put(long id, [FromBody] Department department)
 {
     department.DepartmentId = id;
     departmentBll.UpdateDepartment(id, department);
 }