public IActionResult Add(string name, string description) { var user_id = HttpContext.Session.GetInt32("user_id"); groupFactory.Add(name, description, (int)user_id); var found_name = groupFactory.FindByName(name); var group_id = found_name.id; groupFactory.AddUserGroup((int)user_id, (int)group_id); return(RedirectToAction("Group")); }