Пример #1
0
        public ActionResult Create(User user)
        {
            userBll.CreateUser(user);
            try
            {
                activeUser = userBll.GetUserById((long)HttpContext.Session.GetInt32("userId"));

                if (activeUser.Administrator > 0)
                {
                    //userBll.CreateUser(user);
                }

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                ViewData["sessionData"] = new int?[] { HttpContext.Session.GetInt32("admin"), HttpContext.Session.GetInt32("language") };
                return(View());
            }
        }
Пример #2
0
 //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 Post([FromBody] User user)
 {
     userBll.CreateUser(user);
 }
Пример #3
0
 public void Post([FromBody] User user)
 {
     userBll.CreateUser(user);
     //userProcessor.Create(user);
 }